01-14-2015
Best ways to get clear info about CPU and Memory
Hello all
i did search the web and found allot of answers but im confused
what are the best ways to get this info via Linux default commands
1. current Cpu Usage in Percent
2. current Memory Usage In Bytes
3. current Memory Available In Bytes
Thanks!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi...
how can i clear the Memory on AIX 4.3.3 without rebooting (like flush memory on oracle database )
THANX
fenomen (2 Replies)
Discussion started by: fenomen
2 Replies
2. SCO
Hi all... am not so much brilliant in this area... here i think many good hearted peoples around... so if anybody have intention to reply for my problem please give me a cut and clear picture of how... Thanks.
ok comming to my problem...
In our MHC server (Sco Unix 4.*) running 19 C process... (1 Reply)
Discussion started by: yocks
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Is there a command I can use to find out how many CPU's and what type are on my server? (I was told to use cat /proc/cpuinfo)
Also, how do I know what kind of bus speeds are on my server?
Thanks in advance:) (3 Replies)
Discussion started by: ihot
3 Replies
4. HP-UX
is there a single command or location from which one can get information like cpu Mhz,cpu cache...etc in HP UX:) (1 Reply)
Discussion started by: vijayca
1 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
Does anyone know what the best commands in the UNIX command line are for obtaining this info:
current CPU usage
memory usage
virtual memory usage
preferably with date and time parameters too?
thanks
ocelot (4 Replies)
Discussion started by: ocelot
4 Replies
6. HP-UX
Hi,
I am going to buy a software that is licenced per CORE.
I have a HPUX B1123 64 bit with 8 cpus.
How can i know how many cores are in my machine ?
Thanks (3 Replies)
Discussion started by: yoavbe
3 Replies
7. UNIX for Dummies Questions & Answers
I have a laptop running ubuntu 10.10. In Gparted I see numerous partitions. This was installed 'I believe' using the 'encrypt home folder' option using the install disk. I am trying to determine 'as a matter of fact' since I did not do the install, which partitions are in fact encrypted, and... (0 Replies)
Discussion started by: Marcus Aurelius
0 Replies
8. UNIX for Dummies Questions & Answers
I have searched and searched this topic but without looking at source code ; my next step maybe , I find the same ambiguous information.
My main question is how is the target code translated? It is stated that there are variables created that hold the data that the emulated CPU would hold in... (12 Replies)
Discussion started by: theKbStockpiler
12 Replies
9. Programming
The environment is Java/Windows. The program keeps near real-time state in memory cache, which is updated by multiple sources, size of the cache is roughly 500 MB, frequency of updates is ~ 20 per second. I am looking into different ways to keep current snapshot of the memory on the disk for a)... (9 Replies)
Discussion started by: migurus
9 Replies
10. Solaris
hi all,
i have noticed that my server has 64 GB RAM and i have application in this server but the server has free memory only 15% and utilized 85% however it didn't eat from swap .
does any parameter can be configured in kernel to make the system clear memory from cache like linux
i found... (4 Replies)
Discussion started by: maxim42
4 Replies
LEARN ABOUT MINIX
sysinfo
SYSINFO(2) Linux Programmer's Manual SYSINFO(2)
NAME
sysinfo - return system information
SYNOPSIS
#include <sys/sysinfo.h>
int sysinfo(struct sysinfo *info);
DESCRIPTION
sysinfo() returns certain statistics on memory and swap usage, as well as the load average.
Until Linux 2.3.16, sysinfo() returned information in the following structure:
struct sysinfo {
long uptime; /* Seconds since boot */
unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
unsigned long totalram; /* Total usable main memory size */
unsigned long freeram; /* Available memory size */
unsigned long sharedram; /* Amount of shared memory */
unsigned long bufferram; /* Memory used by buffers */
unsigned long totalswap; /* Total swap space size */
unsigned long freeswap; /* Swap space still available */
unsigned short procs; /* Number of current processes */
char _f[22]; /* Pads structure to 64 bytes */
};
In the above structure, the sizes of the memory and swap fields are given in bytes.
Since Linux 2.3.23 (i386) and Linux 2.3.48 (all architectures) the structure is:
struct sysinfo {
long uptime; /* Seconds since boot */
unsigned long loads[3]; /* 1, 5, and 15 minute load averages */
unsigned long totalram; /* Total usable main memory size */
unsigned long freeram; /* Available memory size */
unsigned long sharedram; /* Amount of shared memory */
unsigned long bufferram; /* Memory used by buffers */
unsigned long totalswap; /* Total swap space size */
unsigned long freeswap; /* Swap space still available */
unsigned short procs; /* Number of current processes */
unsigned long totalhigh; /* Total high memory size */
unsigned long freehigh; /* Available high memory size */
unsigned int mem_unit; /* Memory unit size in bytes */
char _f[20-2*sizeof(long)-sizeof(int)];
/* Padding to 64 bytes */
};
In the above structure, sizes of the memory and swap fields are given as multiples of mem_unit bytes.
RETURN VALUE
On success, sysinfo() returns zero. On error, -1 is returned, and errno is set to indicate the cause of the error.
ERRORS
EFAULT info is not a valid address.
VERSIONS
sysinfo() first appeared in Linux 0.98.pl6.
CONFORMING TO
This function is Linux-specific, and should not be used in programs intended to be portable.
NOTES
All of the information provided by this system call is also available via /proc/meminfo and /proc/loadavg.
SEE ALSO
proc(5)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 SYSINFO(2)