Results 1 to 7 of 7
-
1st Dec 2010, 05:40 PM #1OPMember
Linux system info ( C)
Compiled Binary ( compiled using gcc )
http://dl.dropbox.com/u/8626323/c/sysinfo
usage instructions :
Code:wget http://dl.dropbox.com/u/8626323/c/sysinfo ./sysinfo
to compile
save the code to a file and call it sysinfo.c, then use gcc to compile it
gcc sysinfo.c
PHP Code:#include <stdio.h>
#include <sys/sysinfo.h>
int main(){
int days, hours, mins;struct sysinfo KWWH_sysinfo;
if(sysinfo(&KWWH_sysinfo) != 0)perror("sysinfo");
days = KWWH_sysinfo.uptime / 86400;hours = (KWWH_sysinfo.uptime / 3600) - (days * 24);mins = (KWWH_sysinfo.uptime / 60) - (days * 1440) - (hours * 60);
printf("KWWHunction linux Info\n");printf("Uptime: %ddays, %dhours, %dminutes, %ldseconds\n",days, hours, mins, KWWH_sysinfo.uptime % 60);
printf("Load Avgs: 1min(%ld) 5min(%ld) 15min(%ld)\n",KWWH_sysinfo.loads[0], KWWH_sysinfo.loads[1], KWWH_sysinfo.loads[2]);printf("Total Ram: %ldk\tFree: %ldk\n", KWWH_sysinfo.totalram / 1024,KWWH_sysinfo.freeram / 1024);
printf("Number of processes: %d\n", KWWH_sysinfo.procs);return 0;
}
desiboy Reviewed by desiboy on . Linux system info ( C) http://cdnpic.com/upload/5bab0549.png Compiled Binary ( compiled using gcc ) http://dl.dropbox.com/u/8626323/c/sysinfo usage instructions : wget http://dl.dropbox.com/u/8626323/c/sysinfo Rating: 5Coding Horror Fan
I don't read PM's frequently .
-
1st Dec 2010, 05:54 PM #2MemberWebsite's:
Google.comCan you get on msn and stop acting like a kid please ?
-
1st Dec 2010, 05:54 PM #3OPMember
no..I am working on a database . almost done
Coding Horror Fan
I don't read PM's frequently .
-
1st Dec 2010, 07:19 PM #4Member
well its about time I couldn't find it when TTS told me 2 look hmm
Please follow signature rules
-
2nd Dec 2010, 05:00 PM #5OPMember
common , I know that every one knows "C" here ...
add some more nice functions to thisCoding Horror Fan
I don't read PM's frequently .
-
3rd Dec 2010, 04:08 PM #6MemberWebsite's:
Google.comCan you free some space in your inbox ?
and get on msn too
-
7th Dec 2010, 05:57 PM #7OPMember
done..
btw this is a thread in programming sectionCoding Horror Fan
I don't read PM's frequently .
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
[VPS] 9xhost.info - Linux VPS Starting at $7.75 [NL/US]
By pubic_html in forum ArchiveReplies: 55Last Post: 6th Jan 2012, 12:26 AM -
[Shared] [NL] www.WTFHost.info - Shared Linux Hosting - Offshore
By Derka in forum ArchiveReplies: 3Last Post: 2nd Jan 2011, 03:10 AM -
Get FULL System Info using Batch + Explained ;)
By l0calh0st in forum Web Development AreaReplies: 1Last Post: 2nd Oct 2010, 01:14 PM -
[AMS] xSysInfo - Get all info about your System
By l0calh0st in forum Web Development AreaReplies: 4Last Post: 1st Aug 2010, 01:28 PM -
Linux File System Explained For Beginners
By Plutost in forum Tutorials and GuidesReplies: 4Last Post: 7th Sep 2009, 04:07 PM
themaManager - edit and manage...
Version 4.04 released. Open older version (or...