Hi!
How can I retrive system infos under linux/unix? I want to know CPU
frequency, CPU usage, RAM, RAM usage.
THX
Mr. S 5 6547
"Mr. S" <Ma******@gmx.d e> wrote in message
news:e3******** *************** ***@posting.goo gle.com... Hi!
How can I retrive system infos under linux/unix? I want to know CPU frequency, CPU usage, RAM, RAM usage.
Probably ask in a linux programming newsgroup.
- JFA1
Mr. S wrote: Hi!
How can I retrive system infos under linux/unix? I want to know CPU frequency, CPU usage, RAM, RAM usage.
THX Mr. S
Open the files in /proc and parse for the info.
e.g. cpuinfo: /proc/cpuinfo
Mr. S wrote: How can I retrive system infos under linux/unix? I want to know CPU frequency, CPU usage, RAM, RAM usage.
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 3.00GHz
stepping : 9
cpu MHz : 2994.945
cache size : 512 KB
physical id : 0
siblings : 1
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce \
cx8 apic sep mtrr pge mca cmov pat pse36 clflush \
dts acpi mmx fxsr sse sse2 ss ht tm
bogomips : 5976.88
cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 3169955840 2455195648 714760192 0 77500416
2259369984
Swap: 6440329216 8298496 6432030720
MemTotal: 3095660 kB
MemFree: 698008 kB
MemShared: 0 kB
Buffers: 75684 kB
Cached: 2204828 kB
SwapCached: 1588 kB
Active: 1527844 kB
ActiveAnon: 6020 kB
ActiveCache: 1521824 kB
Inact_dirty: 200812 kB
Inact_laundry: 232080 kB
Inact_clean: 324152 kB
Inact_target: 456976 kB
HighTotal: 2228160 kB
HighFree: 683172 kB
LowTotal: 867500 kB
LowFree: 14836 kB
SwapTotal: 6289384 kB
SwapFree: 6281280 kB
Le Mon, 28 Mar 2005 15:18:27 -0800, Mr. S a écrit*: Hi!
How can I retrive system infos under linux/unix? I want to know CPU frequency, CPU usage, RAM, RAM usage.
you can use a library such as libgtop.
"E. Robert Tisdale" <E.************ **@jpl.nasa.gov > wrote in message news:<d2******* ***@nntp1.jpl.n asa.gov>... Mr. S wrote:
How can I retrive system infos under linux/unix? I want to know CPU frequency, CPU usage, RAM, RAM usage.
> cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Pentium(R) 4 CPU 3.00GHz stepping : 9 cpu MHz : 2994.945 cache size : 512 KB physical id : 0 siblings : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce \ cx8 apic sep mtrr pge mca cmov pat pse36 clflush \ dts acpi mmx fxsr sse sse2 ss ht tm bogomips : 5976.88
> cat /proc/meminfo total: used: free: shared: buffers: cached: Mem: 3169955840 2455195648 714760192 0 77500416 2259369984 Swap: 6440329216 8298496 6432030720 MemTotal: 3095660 kB MemFree: 698008 kB MemShared: 0 kB Buffers: 75684 kB Cached: 2204828 kB SwapCached: 1588 kB Active: 1527844 kB ActiveAnon: 6020 kB ActiveCache: 1521824 kB Inact_dirty: 200812 kB Inact_laundry: 232080 kB Inact_clean: 324152 kB Inact_target: 456976 kB HighTotal: 2228160 kB HighFree: 683172 kB LowTotal: 867500 kB LowFree: 14836 kB SwapTotal: 6289384 kB SwapFree: 6281280 kB
Thanks a lot Mr. Tisdale! That's the right information!
THX
Mr. S This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ayesha Ahsan |
last post by:
Hi,
I use Runtime.getRuntime().exec(command) to make my system call.
For Windows based Dos, i add "cmd /c" before I type in my system
call. So for example make the system call "dir":
String command="cmd /c dir";
Runtime.getRuntime().exec(command);
What is the equivalenr of cmd /c in Unix .
|
by: Scott |
last post by:
Not sure if this is the right place to post this or not, but I am in the
process of trying to find a Web Hosting/Isp Billing system that is
reasonable in price and uses Access or SQL Server for a backend DB. I have
found a couple that seem to do what I want, but are using FILEMAKER for
their DB. Looking for something that will handle reoccuring billing as well
as per project billing. Keeping up with client info, etc.... Also needs to...
|
by: Zorba.GR |
last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64
bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite
Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager Express
Edition v1.3.2 Win, IBM Tivoli System Automation v1.2.0 Linux, IBM
Tivoli Workload Scheduler Virtualized Data Centers v8.2 , other
IBM Tivoli CDs, WEBSPHERE EVERYPLACE MOBILE PORTAL v5.0 - ALTIUM , other IBM WebSphere Business CDs...
|
by: SR |
last post by:
Hi,
I need to read the output from a system( ) function within a C program.
The function however only returns the exit status.
How can I read what system( ) sends to stdout ?
(is there a simpler way than having to fork a child process and then
catching its output ?)
(if needed: working on linux)
Thanks
|
by: markus |
last post by:
Hi,
There are more than 1000 defined system calls in the Unix standard
specification, however, a majority of them are optional and the
availability of system calls are dependent on the OS implementation
itself.
The question I have is: How do you determine which system calls are
available on any Unix/Linux machine?
| |
by: ulyses |
last post by:
Let's assume I have following file:
2938929384902491233.....
923949919199191919112....
File contains INTs only. What is more they are huge. For example first
row in file may contain integer which size is 50MB and the second 30MB.
Now we come to my problem. Is there possibility to swap this rows
without using system memory (preferably in Unix/Linux)? Is there any
function in C to do this?
|
by: Marco |
last post by:
Hello,every one, I meet a question:
in my old script, I usually use os.popen2() to get info from standard
unix(LinuX) program like ps,ifconfig...
Now, I write a OO-based programme, I still use os.popen2( check
whether mplayer still working via ps command ), but some things I got
the following message:
Traceback (most recent call last):
|
by: Concepts Systems |
last post by:
Hello All,
With a growing demand for Linux System Professionals, we are pleased
to announce a new weekend batch of "Advance C" and "Linux System
Programming" for working professionals and Engineers and also
freshers.
Course Highlights:
Advance C:
|
by: Richard Nixon |
last post by:
I'll just be in and out with a quick question.
If you have an unzip32.exe and a.zip in the same directory as the ensuing
executable, what source in c++ imitates the following pseudo-source:
#include <stdio.h>
int main(void)
system " unzip32 " "a.zip"
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |