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)
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)
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)
Hi,
I need some help about a script i need to write.
I want to check , if some specific process, are running since 2 hours.
I tried to use a loop , grep my pid and use find -ctime on /proc directory, to list what i need.
for i in `ps -ef |grep process |grep -v grep|awk '{print $2}'`... (2 Replies)
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)
Hi Folks,
I have been checking on a redhat server for patching, when I tried the output for uptime and who -b both are not matching. I do not know the reason what happened and why it seems like this.
Please assist someone and explain in detail.
I would appreciate if I get the right... (5 Replies)
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
LEARN ABOUT HPUX
uptime
uptime(1) General Commands Manual uptime(1)NAME
uptime, w - show how long system has been up and/or who is logged in and what they are doing
SYNOPSIS
[user]
[pset_list]]
[user]
[pset_list]]
DESCRIPTION
prints the current time, the length of time the system has been up, the number of users logged on to the system, and the average number of
jobs in the run queue over the last 1, 5, and 15 minutes for the active processors.
is linked to and prints the same output as displaying a summary of the current activity on the system.
Options
and recognize the following options:
Print the current time, the length of time the system has been up,
and the number of users logged on to the system in the first line of the output. The average number of jobs in the core over
the last 1, 5, and 15 minutes for the active processors is also printed.
When used with the option, the load averages for the processor sets (psets) are calculated on a core basis.
Suppress the first line and the heading line.
This option should not be used with the option. This option assumes the use of the option to
Use long output.
This option assumes the use of the option to
Print the current time, the length of time the system has been up, and
the number of users logged on to the system in the first line of the output. The load averages over the last 1, 5, and 15
minutes for the processor sets (psets) given in the command line, pset_list, are displayed in the subsequent lines. If no
arguments are given, the load averages are displayed for all the psets in the system.
If pset id of an empty pset is given in the command line, a corresponding message will be displayed. If the kernel does not
have the pset capability, gives an error. The option cannot be used along with other options except
Use the short form of output for displaying terminal information.
The terminal name is abbreviated, and the login time and CPU times are suppressed.
Print only the first line describing the overall state of the system.
This is the default for the command.
Print a summary of the current activity on the system for each user.
This is the default for the command.
EXAMPLES
The command:
produces text resembling the following:
depending upon the current status of the system.
The command:
gives the load average of all the psets in the system. If 0, 94, 95, and 97 are existing psets in the system, the output will look like
the following:
The command:
gives output which looks like the following if 94 and 95 are valid pset ids:
The command:
gives the load average of the system, producing output resembling the following:
The command:
gives the load average of all the psets in the system. If 0 and 1 are psets in the system, the output will look like the following:
AUTHOR
was developed by the University of California, Berkeley and HP.
SEE ALSO mpctl(2), pset_ctl(2).
uptime(1)