|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Getting a process/program version from /proc folder
Hello
I am writing a script that will first execute ps to get the list of processes running, and the go into the /proc folder for each PID listed and gather relevant information. I looked through the contents of a particular process in the /proc folder and I can't find where I can locate the version of the running process/program. Ideally I don't want to get the name of the program and then execute a command to get the version of the program, because I am trying to write a script to do this constantly across a variety of machines; although most programs can reveal their version numbers using --version tag, it is not reliable and may differ per program. Can anyone help? Thanks |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
It would be nice, but it's certainly not something you can extract from /proc/. Processes and executables don't really have that kind of embedded information. You'll have to deal with the programs and OSes the hard way.
There's systems that don't even have /proc by the way, like OSX and HPUX. |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
thanks, only Linux is in scope for my script so I am not worried about cross OS just yet.
well thanks for the quick reply....I guess its going to be a If, else unknown... |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Output of /proc/version | Hari_Ganesh | Red Hat | 7 | 07-02-2010 02:12 AM |
| AIX equivalent to /proc/self/cmdline to get process name from C++ program | tbk | AIX | 1 | 10-27-2009 07:53 AM |
| How to call a proc file from *.c program? | pat_and_cami | Linux | 4 | 02-15-2006 01:24 AM |
|
|