10-20-2009
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Folks
uptime
12:24pm up 2 days, 3:12, 4 users, load average: 0.00, 0.00, 0.00
what does the load average figure mean..
regards
Hrishy (2 Replies)
Discussion started by: xiamin
2 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to get the uptime of my computer (Mac OS X) and I can go into the terminal and type "uptime" OK, and that gives me a string with the uptime in it. The problem is that the string changes a lot, and its very difficult to get the data I'm trying to extract out cleanly.
Now I have 3... (2 Replies)
Discussion started by: Freefall
2 Replies
3. UNIX for Dummies Questions & Answers
On HP-UX, the 13th argument of uptime is sometime the load and sometime the word AVERAGE:???
14 Jun 06 5:00pm up 44 days, 54 mins, 0 users, load average: 0.00, 0.02, 0.03
14 Jun 06 5:15pm up 44 days, 1:09, 0 users, load average: 0.00, 0.01, 0.01
When the time is in minutes, then the load... (1 Reply)
Discussion started by: qfwfq
1 Replies
4. UNIX for Dummies Questions & Answers
hello folks!
how can I display just the uptime without the current time, the word "up", and the load averages using the uptime command or some other command I do not know about? (13 Replies)
Discussion started by: MastaFue
13 Replies
5. Solaris
HI All,
I have problem with "uptime" on one of the sun server.(SunOS 5.9 Generic_118558-11 sun4u sparc SUNW,Sun-Fire-V240).when i am issuing uptime command its not showing uptime.even its not showing output for who -b.
$ uptime
11:01am 1 user, load average: 0.06, 0.04, 0.03
$ who -b
$... (3 Replies)
Discussion started by: jeevanbv
3 Replies
6. UNIX for Advanced & Expert Users
Hi gurus,
Is it possible to get the time on when the server was re-started or does the output from who -b is the answer to my question? UNIX flavour is Solaris.
The uptime command gives information on how long the server has been up but I want to know when the server was started. The output... (4 Replies)
Discussion started by: newbie_01
4 Replies
7. Linux
Hi All
is there a way that i can return uptime if the machine has been on for longer than 4 days
thanks
ab (3 Replies)
Discussion started by: ab52
3 Replies
8. Shell Programming and Scripting
Hi!
I want to extract the uptime from the output of the uptime command.
The output:
11:53 up 3:02, 2 users, load averages: 0,32 0,34 0,43
I just need the "3:02" part. How can I do this?
Dirk (6 Replies)
Discussion started by: Dirk Einecke
6 Replies
9. Shell Programming and Scripting
How to write a shell script which can generate server uptime report from the UNIX servers? (3 Replies)
Discussion started by: paventhan
3 Replies
10. War Stories
Hi All,
Having recently started a new job, a Data Center Migration in fact I have been tasked with looking at some of the older Solaris boxes when I came across this little gem.
nismas# uname -a
SunOS nismas 5.5.1 Generic_103640-27 sun4u sparc SUNW,Ultra-1
nismas# uptime
10:37am up 2900... (2 Replies)
Discussion started by: gull04
2 Replies
SHLOCK(1) InterNetNews Documentation SHLOCK(1)
NAME
shlock - Create lock files for use in shell scripts
SYNOPSIS
shlock [-b|-c|-u] -f name -p pid
DESCRIPTION
shlock tries to create a lock file named name and write the process ID pid into it. If the file already exists, shlock will read the
process ID from the file and test to see whether the process is currently running. If the process exists, then the file will not be
created. shlock exits with a zero status if it could create the lock file, or non-zero if the file refers to a currently active process.
OPTIONS
-b Process IDs are normally read and written in ASCII. If the -b flag is used, then they will be written as a binary int.
-c If the -c flag is used, then shlock will not create a lock file, but will instead use the file to see if the lock is held by another
program. If the lock is valid, the program will exit with a non-zero status; if the lock is not valid (i.e. invoking shlock without
the flag would have succeeded), then the program will exit with a zero status.
-f name
name is the name of the lock file shlock attempts to create. If the file already exists, it will read the process ID from the file and
exit with a non-zero status if this process is currently active.
-p pid
pid is the process ID to write into the file name.
-u For compatibility with other systems, the -u flag is accepted as a synonym for -b since binary locks are used by many UUCP packages.
EXAMPLES
The following example shows how shlock would be used within a shell script:
LOCK=<pathrun in inn.conf>/LOCK.send
trap 'rm -f ${LOCK} ; exit 1' 1 2 3 15
if shlock -p $$ -f ${LOCK} ; then
# Do appropriate work.
else
echo "Locked by `cat ${LOCK}`"
fi
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews after a description of HDB UUCP locking given by Peter Honeyman, and improved by
Berend Reitsma to solve a race condition. Converted to POD by Julien Elie.
$Id: shlock.pod 8357 2009-02-27 17:56:00Z iulius $
INN 2.5.2 2009-05-21 SHLOCK(1)