04-18-2013
Yes, as you concluded, a pid is NOT unique within a 24 hour period. My understanding is they reach a maximum value, go back to lowest open value, and then start increasing again, reusing open slots are available.
Yes, the addition of "date +%Y%m%d_%H%M%S" to the file name will make the file name unique. That seems like a very good way, probably the best way.
This User Gave Thanks to hanson44 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
$!>PID_FILES
I try to get the PID of the last process on the files called PID_FILES.
But the command stands by on the output screen. I have to tape on ENTER to get the prompt and continue .
How may I simulate this action ( tape on ENTER ).
thanks (1 Reply)
Discussion started by: hoang
1 Replies
2. UNIX for Dummies Questions & Answers
1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection?
2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies
3. UNIX for Advanced & Expert Users
Hi!
I'm facing a unique problem!
When I run a program on HPUX, it runs fine but it also produces a bunch of files of the format:
tr.<pid>.number
the contents of these files are a bunch of numbers and I know for a fact that these files are not created by the program I'm running.
Seems... (3 Replies)
Discussion started by: zackz
3 Replies
4. Shell Programming and Scripting
Hi All,
I am getting the PID of a process using its name using the following command
in a script
mypid=`ps aux | awk '/test5/ && !/awk/ { print $2 }'`
echo PID is $mypid
The problem is the PID is not getting printed. But when i run the command directly in shell, the PID got printed.
... (2 Replies)
Discussion started by: amio
2 Replies
5. Shell Programming and Scripting
Hi to everybody.
Is it possible to nohup a process and redirect the output to a file containing the PID?
E.g. if
nohup filename > out.nohup
associate the PID=8074 to filename, is it possible to call the output file something like out_8074.nohup instead of out.nohup? By this way it would... (0 Replies)
Discussion started by: plsrn
0 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
i have a script called a.sh and within a.sh it calls b.sh.
when i do a ps -ef | grep a.sh, i get two sets of number
user_test 4225 3250 0 10:31 pts/1 00:00:00 a.sh
when i do a ps -ef | grep b.sh, i get two sets of number
user_test 4269 4225 22 10:31 pts/1 00:00:45... (17 Replies)
Discussion started by: new2ss
17 Replies
7. AIX
Hi all,
I am generating the coredump of my JBoss, and by default it puts it in to a particular directory. i.e. JBOSS_HOME/. I would like this output file to be created, lets say in /tmp/dump/.
I tried the following:
kill -3 9404940>/tmp/dump/out.txt
But it created... (3 Replies)
Discussion started by: haroon_a
3 Replies
8. Shell Programming and Scripting
pariosd -status
NodeName ID ROLE STATE PROTECTION
---------------------------------------------------------------------------
tn320_scm10 10 ACTIVE UP No Protection
tn320_scm11 11 UNKNOWN UNKNOWN
LocalApps ... (5 Replies)
Discussion started by: hariprasad123
5 Replies
9. UNIX for Dummies Questions & Answers
Hi Friends
I have 2 solaris boxes and I need to check certain directories (on local filesystem and mounted nfs) to make sure that they match up on both boxes and to delete or move the other mismatches to elsewhere on the local filesystem.
I investigated for unix commands like rsync, and tree... (1 Reply)
Discussion started by: mpc8250
1 Replies
10. Shell Programming and Scripting
Hi
May i ask if someone know a package that will search a directory recursively and compare determine duplicate files according to each filename, date modified or any attributes that will determine its duplicity
If none where should i start or what are those command in shell scripting that... (11 Replies)
Discussion started by: jao_madn
11 Replies
SADC(8) Linux User's Manual SADC(8)
NAME
sadc - System activity data collector.
SYNOPSIS
/usr/lib/sa/sadc [ -I ] [ -V ] [ -x pid ] [ -X pid ] [ interval [ count ] ] [ outfile ]
DESCRIPTION
The sadc command samples system data a specified number of times ( count ) at a specified interval measured in seconds ( interval ). It
writes in binary format to the specified outfile or to the standard output. If outfile is set to -, then sadc uses the standard system
activity daily data file, the /var/log/sa/sadd file, where the dd parameter indicates the current day. When the count parameter is not
specified, sadc writes its data endlessly. When both interval and count are not specified, a dummy record, which is used at system startup
to mark the time when the counter restarts from 0, will be written. For example, one of the system startup script may write the restart
mark to the daily data file by the command entry:
/usr/lib/sa/sadc -
The sadc command is intended to be used as a backend to the sar command.
Note: The sadc command reports only local activity.
OPTIONS
-I Tell sadc to report statistics for all system interrupts. By default, sadc only reports statistics for the total number of inter-
rupts.
-V Print version number and usage then exit.
-x pid Tell sadc to report statistics for the process whose PID is pid.
-X pid Tell sadc to report statistics for the child processes of the process whose PID is pid. The SELF keyword indicates that statistics
are to be reported for the child processes of the sadc process itself.
EXAMPLES
/usr/lib/sa/sadc 1 10 /tmp/datafile
Write 10 records of one second intervals to the /tmp/datafile binary file.
BUGS
/proc filesystem must be mounted for the sadc command to work.
All the statistics are not necessarily available, depending on the kernel version used.
FILES
/var/log/sa/sadd
Indicate the daily data file, where the dd parameter is a number representing the day of the month.
/proc contains various files with system statistics.
AUTHOR
Sebastien Godard <sebastien.godard@wanadoo.fr>
SEE ALSO
sar(1), sa1(8), sa2(8), mpstat(1), iostat(1), vmstat(8)
http://perso.wanadoo.fr/sebastien.godard/
Linux DECEMBER 1999 SADC(8)