The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > HP-UX
Google UNIX.COM


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

More UNIX and Linux Forum Topics You Might Find Helpful
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

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 08-31-2006
Registered User
 

Join Date: Feb 2006
Posts: 35
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
Reply With Quote
Forum Sponsor
  #2  
Old 09-01-2006
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,328
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.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 04:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0