Operating System - Linux
1820171 Members
4019 Online
109620 Solutions
New Discussion юеВ

Check the system information.

 
eric_204
Frequent Advisor

Check the system information.

I have a Red Hat Linux system , how can I exactly know the OS , kernel version and the SWAP memory system ? thx.
9 REPLIES 9
Rick Garland
Honored Contributor

Re: Check the system information.

The command "uname -a" will provide the kernel & OS info. In the /proc directory you will see a file called "swaps" - view this file and it will tell you how big swap is and on what partition.
Stuart Browne
Honored Contributor

Re: Check the system information.

All pretty simple.

Kernel version/revision: uname -r

RH distribution : cat /etc/redhat-release

Swap details : grep ^Swap: /proc/meminfo
(these are total, available, in use).

The entire /proc/meminfo might be of interset to you however, as it lists a great deal of other interesting memory details.
One long-haired git at your service...
Stuart Browne
Honored Contributor

Re: Check the system information.

Ooo.. swaps.. forgot about that one! I was trying to remember a command that listed them for you (I vaugely remember 'swapon -l', but that isn't it).. oh my fading memory *pout*..
One long-haired git at your service...
Rick Garland
Honored Contributor

Re: Check the system information.

A little more info. The /proc directory will contain a lot of info about your system. Example, on my RH there is a file called cpuinfo and this file contains lots of info concerning the CPU - what type,, how fast, cache size, etc. Also look at the meminfo file as there is some info about swap in addition to lots of other info concerning memory in general. Look at the version file as well. Bottom line, look at all of the files in this area - just don't make any changes.
Mark Grant
Honored Contributor

Re: Check the system information.

Just a little addition to the swap thing. As almost everybody relies on /proc for all sorts of information even though you can not guarantee that the format of /proc will not change (or indeed still exist) from one release of Linux to the next, your best bet for swap is

swapinfo -s
Never preceed any demonstration with anything more predictive than "watch this"
Stuart Browne
Honored Contributor

Re: Check the system information.

Mark,

what dist/version are you using? None of my RH7/8/9 boxes have 'swapinfo'.
One long-haired git at your service...
Sergejs Svitnevs
Honored Contributor

Re: Check the system information.

A way to find out how much swapspace is being used:

# free

Regards,
Sergejs
Ragu_1
Regular Advisor

Re: Check the system information.

Adding up to all other replies, I request you to look into `vmstat'. The `si' and `so' fields are to be noted. If these values are high, you need to increase RAM. `man vmstat' is quite interesting!
Share and share alike
Mark Grant
Honored Contributor

Re: Check the system information.

Stuart

sorry, it was early in the morning when I posted that and i had just been woken up for a support call :)

It was supposed to be

"swapon -s"

Never preceed any demonstration with anything more predictive than "watch this"