For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > September 2006 > how to find the process status in solaris









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to find the process status in solaris
ramasubramanian.rahul@gmail.com

2006-09-11, 4:01 am

hi all..
i have written some code ( in c ) which fishes out a processes
information from the /proc dircetory in linux... the stat file inside
every pid dirctory give me all the relavant data.. ( pid , ppid ,
current status , etc )....( the code basically does a opendir and
readdir on the /proc directory in linux )......
is there any way i can do this in solaris...
my limitaion is that i cannot use a system command or use spawn a
shell
to use the ps command.....
any help in this regard will be highly appriciated...
thanks in advance
rahul

Doug McIntyre

2006-09-11, 8:01 am

ramasubramanian.rahul@gmail.com writes:
>hi all..
> i have written some code ( in c ) which fishes out a processes
> information from the /proc dircetory in linux... the stat file inside
> every pid dirctory give me all the relavant data.. ( pid , ppid ,
> current status , etc )....( the code basically does a opendir and
> readdir on the /proc directory in linux )......
> is there any way i can do this in solaris...


Why don't you do the same exact thing in Solaris? Read the /proc
directory, parse the data in psinfo, etc.

man -s4 proc
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com