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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pidof for AIX?

Status
Not open for further replies.

BobMCT

IS-IT--Management
Sep 11, 2000
756
US
Linux has a neat command called pidof which some usenet searches show is being used by some aix shops. However, I can't seem to locate a binary for this program.

Does anyone know if/where a binary for v5.1 is. Or does anyone have a binary that will run on v5.1 and be willing to email it? If not, anyone know where the source might be?

TIA
 
hi ,
why don't you use the ps command to get your own pid of a particular process ?

e.g ps -e -o ruser,vsz,pid,time,args | grep cron

or email

miquels@cistron.nl

who is the author of pidof on LINUX and ask if there is similar version on AIX

HTH
 
Alternatively,

You could use this simple PERL script, that uses the AIX command pstat...

#!/bin/perl
use Shell;

@pid = pstat("-a");
foreach (@pid) {
if (/$ARGV[0]/) {
print $_;
}
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top