Tuesday, May 22, 2018

Program to display Kernel Version, CPU Type & Model

/* WAP to display the following:
a. Kernel Version
b. CPU type and model
c. Information in configured memory, amount of free and used memory
*/

#include<stdio.h>
#include<stdlib.h>
#include<unistd.h>
int main()
{
int a;
printf("\nKernel Version:\n");
system("cat /proc/sys/kernel/osrelease");
printf("\nCPU TYPE AND MODEL:\n");
system("cat /proc/cpuinfo | awk 'NR==4,NR==5 {print}'");
        printf("\nInformation on Configured amount of free and Used Memory:\n");
system("cat /proc/meminfo | awk 'NR==1,NR==2 {print}'");
return 0;
}





OUTPUT SCREEN:



No comments:

Post a Comment

Project on Library Management System (C++)

=> The project titled Library Management system is Library management software for monitoring and controlling the transactions in a lib...