![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| i want to give alias | naree | Shell Programming and Scripting | 5 | 03-31-2008 06:00 AM |
| Getting process info in a program | herbmiller | High Level Programming | 1 | 02-14-2008 09:53 AM |
| please give me a script | me_haroon | AIX | 0 | 07-01-2006 01:57 AM |
| IO by Process/program | cpiuk | HP-UX | 2 | 09-16-2004 01:24 AM |
| Give us a hand | RichardB | UNIX for Dummies Questions & Answers | 3 | 05-06-2002 08:37 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
get program name give a process id
Hi ,
I have query regarding to get a program name given a pid in HP-Ux . give procees id ( PID) i would like to retrieve the process/program through a C program ? my input to c program will be will be pid and i would like to know what is process name /program name . Many Thanks Naren |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
In other words, you want to implement a combo of ps and grep... not easy. Use the pstat(2) family of syscalls. Check the man page of pstat(2) for details.
A better way would be to use system and run the "ps |grep" combo. |
||||
| Google The UNIX and Linux Forums |