How to extract process hierarchy information in linux? [closed] - linux

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I want to write a program in Linux which by getting a session id could print all processes and process groups in that session in a tree view structure!?
How can I extract such information!? Should I resort to proc file system?

Most (all?) Linux programs read /proc to know about running processes.
If you are using Perl, then may be Proc::ProcessTable cpan module may save you some work.
Edit: Since you are using C, then you can look at pstree source code to get inspiration.

Related

Logging whenever a file is read, written [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
Due to security requirements, I need to keep a log file of whenever any file on the system is read or written. The log file would look like this:
file - time - user
How would this be done?
See if auditd works for you - http://linux.die.net/man/8/auditd
You could also consider using inotify

Identifying hex value of keystrokes [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I need some guidance on how to write a Perl, VBScript or JavaScript code to display the hex value of a key stroke. I need this mainly for multimedia keys in keyboard like mute, volume up, volume down, etc.
Luckily somebody already wrote it: See
http://www.javascriptkit.com/javatutors/javascriptkey2.shtml

Const compiler/runtime [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How are treated constants in various languages/compilers? They take up space in RAM in runtime or are replaced with their values ​​at compile time?
A compiler is free to go either way. The typical way to handle this is to use scalars directly while keeping larger objects like arrays in memory.
In addition, if you build an embedded system, they typically go into read-only memory like flash rather than RAM.

what is unix/linux internals? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
When somebody asks me about how strong you are in unix/linux internals ? What do they really mean ?
Though i have some idea, i would like to hear from some experts that, what is really meant by unix/linux internals.
My ideas are, i have to be strong in,
linux boot process
user creation
how does a command executes
filesystem related details
process details
I would like to know, whether this is sufficient or something else there ?
Update: I edited this question to add more details, if possible reopen the questions for answers?!
The internal design of the components of the Linux operating system (i.e. the kernel).

looking for a program for linux to view the call stack of my program [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
looking for a native linux program that lets you view the call stack.
You can always run it in gdb debugger, stop at a point and inspect call stack.
As in 'gdb' - the GNU Debugger?
If not, what are you after - in what context do you want to see the call stack?
Very limited information in your question but you can use "addr2line" to translate stack trace to the code of your application (assuming you have an executable with debug symbols).

Resources