process info


 
Thread Tools Search this Thread
Top Forums Programming process info
# 1  
Old 12-16-2008
process info

Can any one tell me how does 'ps' command get information about the processes from operating system data structures?
# 2  
Old 12-16-2008
It depends on the OS - in Linux you can read /proc files, in HP UX there is a large group of functions lumped together under pstat that gather process information.
# 3  
Old 12-17-2008
Yes jim , i want to do this in Linux itself,I had already tried to do this by reading the /proc directory.but in case of certain process like 'nfs' ,the exe link in the corresponding directory is empty so I thought that the ps command does some thing else to get the process info.Do you know any other ways to get the process information in linux
thanks in advance

Last edited by clintoo; 12-17-2008 at 09:47 AM..
# 4  
Old 12-18-2008
That's probably because you don't have the privileges for reading that info. You can get the full command line of the process by reading /proc/<pid>/cmdline
# 5  
Old 12-19-2008
process info

No, I checked it also in root mode but the exe link was shown as empty and the cmdline file does not contain any thing(for the nfsd process).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies

2. Shell Programming and Scripting

Monitoring processes in parallel and process log file after process exits

I am writing a script to kick off a process to gather logs on multiple nodes in parallel using "&". These processes create individual log files. Which I would like to filter and convert in CSV format after they are complete. I am facing following issues: 1. Monitor all Processes parallelly.... (5 Replies)
Discussion started by: shunya
5 Replies

3. Shell Programming and Scripting

script to monitor the process system when a process from user takes longer than 15 min run.

get email notification from from system when a process from XXXX user takes longer than 15 min run.Let me know the time estimation for the same. hi ,any one please tell me , how to write a script to get email notification from system when a process from as mentioned above a xxxx user takes... (1 Reply)
Discussion started by: kirankrishna3
1 Replies

4. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

5. UNIX for Dummies Questions & Answers

kill/pkill process by CMD info.

I have a process that I'd like to kill. Doing a "ps -fu myusername" gives me: UID PID PPID C STIME TTY TIME CMD myusername 5443 1 0 10:05 ? 00:00:00 /bin/sh /some/path/crap.sh -s /yet/another/path/parentProcess myusername 5593 5443 0 ... (2 Replies)
Discussion started by: mrwatkin
2 Replies

6. AIX

How to access process and cpu info on AIX?

Hi, may be this is an AIX noob question: my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (5 Replies)
Discussion started by: DarthVader77
5 Replies

7. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

8. Programming

Getting process info in a program

Hi, I am wondering if there is a way to find out in a C software program if a particular process is running without having to write a file. In the past, I have been using the system command to execute a pgrep and output the info to a file. Then the C program reads the file to make the... (1 Reply)
Discussion started by: herbmiller
1 Replies

9. Linux

Linux process info

Hello, I had a back job scheduled to run at 2 am in the morning in my crontab. I found out that the job did not initiate and there were no logs dumped as to the reason for the failure to initiate. I found the process had started but failed to trigger the job and it had actually hung because it... (2 Replies)
Discussion started by: nayeemmz
2 Replies

10. Programming

How can I get the file info of my process?ugent!!!!!

my project is very big,has many module and sub procedure that written by others,so how to get info of thel file opened or unclosed in my project ? I think there are two ways: 1. with pid_t get process info ,and via file table ( /usr/include/sys/file.h) to check file info. 2. in very... (2 Replies)
Discussion started by: nsun
2 Replies
Login or Register to Ask a Question