Question
In this section you will assemble some basic facts about the system Machine name (hostname) # get this information from /proc/sys/kernel/hostname System date and time
In this section you will assemble some basic facts about the system Machine name (hostname) # get this information from /proc/sys/kernel/hostname System date and time # get this information from /proc/driver/rtc Kernel version # get this information from /proc/version Memory usage (used and free memory) # get this information from /proc/mem info
2. Time information.
In this section you will print out how long the system has been up and how busy it has been.
a. Duration of uptime # get these information from /proc/uptime
b. Duration of idle time
The skeleton of the program
(1) read file “/proc/uptime” to obtain Total time and Idle time
(2) read file “/proc/sys/kernel/hostname” to obtain the hostname
(3) read file “/proc/version” to obtain the kernel version
(4) read file “/proc/mem info” to obtain the amount of used memory and free memory
(5) read file “/proc/driver/rtc” to obtain time and date
Step by Step Solution
3.44 Rating (147 Votes )
There are 3 Steps involved in it
Step: 1
include to work with cout include to work with files include to work with sy...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started