10-25-2012
Quote:
Originally Posted by
123_abc
Is It better to call the process by name or by process ID?
There may be a hundred scripts running with the same name, but they will all have different process ID's.
Quote:
Will the process ID be constant after reboot?
No. The usual procedure is for a process to save a file under /var/run/ somewhere containing its process ID for other things to check.
This User Gave Thanks to Corona688 For This Post:
6 More Discussions You Might Find Interesting
1. Programming
I was hoping someone could assist me on a text-based instant messaging client(using UDP) I am working on. I have the network communication basics already in place but, specifically, needed some further help on the "messaging other users" and "getting a user list" functions. The server code that... (0 Replies)
Discussion started by: AusTex
0 Replies
2. IP Networking
this id the message i get with a suggestions to check those files:
/etc/src.sh
/etc/hosts
/usr/adm/inetd.sec
i have little knowledge of hoe to edit those files/
i went to the etc library and didn't found src.sh file.
what should i do?
also didn't find the inetd.sec file
In the host... (3 Replies)
Discussion started by: amirp
3 Replies
3. UNIX and Linux Applications
hi guyz i work as a system administrator for some organization(am a newbie). one of the solaris machines is loaded with the messenger server...all configured by a former administrator. my task was to create user accounts for the mail and calendar services and as i checked its not working .....i... (0 Replies)
Discussion started by: henokia4j
0 Replies
4. Programming
hi
I am using posix functions such as mq_open, mq_close and including the mqueue.h. but its giving a linking error,"undefined reference to mq_open and mq_close".
it it that we have to link some library or so while compiling... plzzz help
Thanxs
Mohit (0 Replies)
Discussion started by: mohit3884
0 Replies
5. UNIX for Advanced & Expert Users
Hello All,
I am getting " The DT messaging system could not be started" message when wants to login as root on a box running on tru64 5.1A.
/etc/hosts is ok.
when i see in .dt/errorlog it shows message server could not be started.
Thanks for help.
Awadhesh (2 Replies)
Discussion started by: Awadhesh
2 Replies
6. Shell Programming and Scripting
Good Morning,
Users can no longer log into SunBlade 2500 Solaris 9 system (though root still can). Here's what I'm getting and what I've done. I'm most suspicious of the full drive since that pops up twice and I did see one looks full. What's a good way to reduce what's on it?- or.. what else... (2 Replies)
Discussion started by: Stellaman1977
2 Replies
PIDOF(8) Linux System Administrator's Manual PIDOF(8)
NAME
pidof -- find the process ID of a running program.
SYNOPSIS
pidof [-s] [-x] [-o omitpid] [-o omitpid..] program [program..]
DESCRIPTION
Pidof finds the process id's (pids) of the named programs. It prints those id's on the standard output. This program is on some systems
used in run-level change scripts, especially when the system has a System-V like rc structure. In that case these scripts are located in
/etc/rc?.d, where ? is the runlevel. If the system has a start-stop-daemon (8) program that should be used instead.
OPTIONS
-s Single shot - this instructs the program to only return one pid.
-x Scripts too - this causes the program to also return process id's of shells running the named scripts.
-o Tells pidof to omit processes with that process id. The special pid %PPID can be used to name the parent process of the pidof pro-
gram, in other words the calling shell or shell script.
NOTES
pidof is simply a (symbolic) link to the killall5 program, which should also be located in /sbin.
When pidof is invoked with a full pathname to the program it should find the pid of, it is reasonably safe. Otherwise it is possible that
it returns pids of running programs that happen to have the same name as the program you're after but are actually other programs.
SEE ALSO
shutdown(8), init(8), halt(8), reboot(8)
AUTHOR
Miquel van Smoorenburg, miquels@cistron.nl
01 Sep 1998 PIDOF(8)