programming homework help


this deficiencys to production largely or you accord to return if i bear issues you conquer deficiency to be avalible or you accord to return



Objectives of this Lab:

  1. The concrete of this assignment is to get used to the Linux platform.  You conquer do that by answerableness a fine program (in either C, C++ or Java) that conquer vestibule periodicality condition perceiveledge advantageous from the Linux /proc directory.
  2. Access the (/proc) directory and perceive encircling the periodicality perceiveledge from uncertain smooths in this and its sub-directories.

How to income after a while the Program:

  1. Information in the /proc directory is advantageous proportioned as though the smooths were periodical extract smooths.  You may public those smooths, learn out the grounds, hinder or sculpture that grounds, and then halt the smooth.  Repeat for each smooth that you deficiency to supplement all of the deficiencyed grounds.  When you bear supplemented all of the perceiveledge you deficiency, you can sculpture your results to the spread-out. 
  2. Type the program into an editor and calm the program at the enjoin apt.
  3. Compiling and design is done as in Week 4 Linux design.
  4. If you do not experience a designation of some periodicality seduce by the man enjoin, then try the Web exploration engine google for aid (Use a Web browser to vestibule ).

Where to behold for perceiveledge in (/proc) directory ?

Search the (/proc ) directory and its sub-directories for the smooths which comprise perceiveledge required for this lab. You can bedesire to the online manual for over perceiveledge on proc (man proc). For development, you can mark the forthcoming in the enjoin line

over /proc/hostname

to experience the hostname of the channel.

Exercise : Write a program in C or C++ or Java to spread-out the forthcoming perceiveledge.

1. General perceiveledge.
In this individuality you conquer amass some basic facts encircling the periodicality

  1. Machine name  (hostname)   # get this perceiveledge from /proc/sys/kernel/hostname
  2. System age and season                      # get this perceiveledge from /proc/driver/rtc
  3. Kernel version                      # get this perceiveledge from /proc/version
  4. Memory performance (used and loose recollection)   # get this perceiveledge from /proc/meminfo

2. Season perceiveledge.
In this individuality you conquer sculpture out how desire the periodicality has been up and how occupied it has been.


a.   Duration of uptime        # get these perceiveledge from /proc/uptime

b.   Duration of idletime


The skeleton of the program

(1) learn smooth “/proc/uptime” to succeed Totalseason and Idletime

(2) learn smooth “/proc/sys/kernel/hostname” to succeed the hostname

(3) learn smooth “/proc/version” to succeed the meat version

(4) learn smooth “/proc/meminfo” to succeed the aggregate of used recollection and loose recollection


(5) learn smooth “/proc/driver/rtc” to succeed season and age