- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- linux commands
Operating System - Linux
1753939
Members
9330
Online
108811
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2002 04:43 PM
тАО08-05-2002 04:43 PM
linux commands
Red hat 7.2 linux
1. how can i check for how long ( in
days ,hours and mintues) has it been
since the system was last boot?
2.what command will let me check for
how many contex switches has the
kernel performed.
1. how can i check for how long ( in
days ,hours and mintues) has it been
since the system was last boot?
2.what command will let me check for
how many contex switches has the
kernel performed.
-
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2002 05:04 PM
тАО08-05-2002 05:04 PM
Re: linux commands
The first, any Unix user should know:
uptime
Using 'last' should also show you similar details about startup/shutdown/crashes of the system (assuming you don't rotate your utmp/wtmp files).
The latter isn't quite so nice. See if 'sar -w' is enough for you (shows context switches per second). Beyond that, I'm afraid I don't know of any command to do it.
uptime
Using 'last' should also show you similar details about startup/shutdown/crashes of the system (assuming you don't rotate your utmp/wtmp files).
The latter isn't quite so nice. See if 'sar -w' is enough for you (shows context switches per second). Beyond that, I'm afraid I don't know of any command to do it.
One long-haired git at your service...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2002 03:44 AM
тАО08-06-2002 03:44 AM
Re: linux commands
Hi part 1 of your question has already been answered.
Either use the "uptime" command, or
cat /proc/uptime
The first number is the uptime of your system since last reboot in seconds.
Of course you would still have to drill this down to hours, minutes, seconds.
The answer to your 2nd question can also be retrieved from the /proc virtual filesystem (see "man proc" for a complete reference):
# awk '$1~/ctxt/{print $2}' /proc/stat
14308473
Either use the "uptime" command, or
cat /proc/uptime
The first number is the uptime of your system since last reboot in seconds.
Of course you would still have to drill this down to hours, minutes, seconds.
The answer to your 2nd question can also be retrieved from the /proc virtual filesystem (see "man proc" for a complete reference):
# awk '$1~/ctxt/{print $2}' /proc/stat
14308473
Madness, thy name is system administration
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP