System Inspector

Our journey through the operating system starts in userland (user space), outside the kernel. In this project, we’ll implement a Unix utility that inspects the system it runs on and creates a summarized report for the user. If you’ve ever used the top command from a shell, our program will be somewhat similar. To give you an idea of how your program will work, here’s a quick example:

[magical-unicorn:~/P1-malensek]$ ./inspector

System Information


Hostname: magical-unicorn

Kernel Version: 4.20.3-arch1-1-ARCH

Uptime: 32 minutes, 35 seconds

Hardware Information


CPU Model: AMD EPYC Processor (with IBPB)

Processing Units: 2

Load Average (1/5/15 min): 0.15 0.06 0.01

CPU Usage: [##########----------] 50.3%

Memory Usage: [--------------------] 4.6% (0.0 GB / 1.0 GB)

Task Information


Tasks running: 88

Since boot:

Interrupts: 44349

Context Switches: 88340

Forks: 421

PID | State | Task Name | User | Tasks


1 | sleeping | systemd | root | 1

2 | sleeping | kthreadd | root | 1

3 | idle | rcu_gp | root | 1

4 | idle | rcu_par_gp | root | 1

(the entire list of processes is printed -- truncated for brevity)

To get this information, you will use the proc, the process information pseudo-filesystem. While there are other ways to get the information displayed above, you are restricted to using proc in this assignment. There are two great resources for finding out what information is available in proc:

Simply cd /proc in your shell and then run ls to view the files. You’ll see process IDs and several other virtual files that are updated dynamically with system information. Each line shown above in the process listing corresponds to a numbered directory in /proc.

Check out the man page: man proc. The manual has a complete description of every file and directory stored under /proc.

For a quick example, try running cat /proc/uptime. You’ll see the number of seconds the system has been running printed to the terminal.

In this assignment, you will get experience working with:

The open(), read(), and close() system calls for reading file data

Tokenizing text files

opendir and readdir functions for listing directory contents

stat for getting file information

getpwuid() to map user IDs to user names

Argument parsing with getopt

Load averages, calculating CPU usage, and Linux tasks

Each portion of the display can be toggled with command line options. We’ll let the program do the talking by printing usage information (-h option):

[magical-unicorn:~/P1-malensek]$ ./inspector -h

Usage: ./inspector [-ahlrst] [-p procfs_dir]


* -a Display all (equivalent to -lrst, default)

* -h Help/usage information

* -l Task List

* -p procfs_dir Change the expected procfs mount point (default: /proc)

* -r Hardware Information

* -s System Information

* -t Task Information

So the task list, hardware information, system information, and task information can all be turned on/off with the command line options. By default, all of them are displayed.

Pay particular attention to the -p flag. This allows us to change the directory where proc is mounted (/proc by default). We will use this option to test your code with our own pre-populated copy of proc.

Kemahiran: Pengaturcaraan C, Linux, UNIX

Lihat lagi: leave management system project description, description inventory system, complete database project hospital management system sql, complete system upload image php mysql, complete description draw traducir espa, php project complete description, data entry to complete client information for 4500-5000 contacts, data entry to complete client information for 45005000 contacts, description logo for small business, i have ongoing work related to our previous project design a logo for a car company, complete php codes for design shopping cat system, i need a description writer for amazon, job description need for php developer, top australian companies hiring manual software testing engineers for australia, we are looking for a sas programmer for our pharma client in germany frankfurt for contract role duration of the project is 12 m, Make a complete vector file for logo, Project Description Looking for an experienced software developer who\ s very familiar with C++, Javascript, Emscripten to port , wanting to complete writing notes for students

Tentang Majikan:
( 0 ulasan ) San Francisco, United States

ID Projek: #18799922

11 pekerja bebas membida secara purata $106 untuk pekerjaan ini


C and Linux are my top level skills. Can do your project for a couple of hours. Can start wokring immediately.

$80 USD dalam sehari
(368 Ulasan)

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Lagi

$80 USD dalam sehari
(104 Ulasan)

I have experience in deploying and maintaining of: Cloud Computing Platforms: AWS Amazon Web Services,Microsoft AZURE, Google Cloud (GCP). Server Operating Systems: Windows Server 2003-to-2012R2, Windows Ser Lagi

$100 USD dalam 0 hari
(148 Ulasan)

Feel fee to contact me for System [login to view URL] me message to discuss further more details .We provide the comments,images,videos,demos and live sessions in order to help the [login to view URL] payment only after the w Lagi

$50 USD dalam 3 hari
(10 Ulasan)

Hello. Thank you for such a good description of your task. I have a lot of experience working in C on Linux. Since you have provided such a good specification, I know that I can deliver you precisely what you need. I Lagi

$45 USD dalam sehari
(1 Ulasan)

Hello, I'm really intersseted by your proposal, whatever you do (choosing other bidder) I'll work on it, cause I saw a challange inside it. Best regards, Mouad OURGH

$111 USD dalam 3 hari
(1 Ulasan)

Hello, As part of my education (BsC in computer science) I have completed similar projects in the past in some courses. So, I have the experience and the theoretical background to understand exactly what you are ask Lagi

$70 USD dalam 2 hari
(1 Ulasan)

we are computer sciense master students and 2 of us are data structure and algorithms teacher and we are international computer science algorithm tournoment winners and can do your project easily and walk you through t Lagi

$200 USD dalam 3 hari
(1 Ulasan)

Hello. I completely read and understand the task. I have some experience with C-programming, Linux-programming and using getopt library. Info about working with proc directory can be googled. I can handle it. At yo Lagi

$55 USD dalam 3 hari
(1 Ulasan)

"Hi, Hope you are doing well! Thanks for sharing your project requirement with us. It will be our great pleasure to work on your project. I have checked your requirement, yes we can do it, because we already work on si Lagi

$208 USD dalam 7 hari
(0 Ulasan)

I have been working in a reputed IT company for last 4 years. I have experience in c and c++. I used the commands in our daily routine. i can will meet the project requirements

$166 USD dalam 10 hari
(0 Ulasan)