Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Process Info

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am running an excutable on Unix...say 'myexe.' I'm willing to write a c/c++ program that will give me the information about the status of 'myexe'..like is it running/terminated..how long it is running etc. My starting point is I know ONLY the name of executable.


Any ideas how to go about this.
 
As a starting point you need to look at the 'ps' command.
Do a 'man ps' to read up on this command.

to see your process do 'ps -f myexe' this will display the process - if it is running. The man page will explain what all the columns represent.

Some version of unix allow you to specify what info the ps command will output using the -o option.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top