Operating System - Linux
1753907
Members
8684
Online
108810
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 11:06 PM
тАО08-05-2002 11:06 PM
program
i wanted to write a default version of program to report the behavior of the linux kernel by inspecting kernel state.i want the program to print the following values on stdout.
1 cpu type and model of the pc
2.kernel version
3.amount of time since the system the system was last booted, in the form 4days 10hrs 20 minutes 32 seconds formatted 04:10:20:32...
1 cpu type and model of the pc
2.kernel version
3.amount of time since the system the system was last booted, in the form 4days 10hrs 20 minutes 32 seconds formatted 04:10:20:32...
-
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-05-2002 11:45 PM
тАО08-05-2002 11:45 PM
Re: program
1) start with 'uname -m', and then look at /proc/cpuinfo
2) uname -r
3) bit of uptime parsing.. look at 'cut', or 'awk'. As to where you're gonna get the seconds from, I'm not sure..
2) uname -r
3) bit of uptime parsing.. look at 'cut', or 'awk'. As to where you're gonna get the seconds from, I'm not sure..
One long-haired git at your service...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-06-2002 04:17 PM
тАО08-06-2002 04:17 PM
Re: program
uname -r shows the kernel version
uname -v shows the last boot time in the format you want. For instance, on my system,
uname -v returns
#1 Mon Jun 10 15:31:48 EDT 2002
cat /proc/cpuinfo
returns a bunch of information on the cpu.
Mark
uname -v shows the last boot time in the format you want. For instance, on my system,
uname -v returns
#1 Mon Jun 10 15:31:48 EDT 2002
cat /proc/cpuinfo
returns a bunch of information on the cpu.
Mark
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