Thursday 1 October 2009

How to check memory size in Solaris

ref : http://sysdigg.blogspot.com/2007/12/how-to-check-memory-size-in-solaris.html
There are various options to check memory in Solaris. I am running Solaris 8 on Sun Fire server, these Solaris commands can run on any x86 or SPARC platforms.

1. Check real/physical memory size in Solairs using dmesg (message information during boot time ):

# dmesg |grep mem

Dec 14 21:56:21 bos-solaris unix: [ID 168242 kern.info] mem = 523836K (0x1ff8f000)

This Solaris server has 512 mb physical memory ,dmesg output show memory in kilobytes which is 512 Megabytes.

2. Check memory size in solairs using prtdiag (only on sparc) :

# /usr/platform/sun4u/sbin/prtdiag |grep Memory

Memory size: 512 Megabytes

Running prtdiag output show memory as 512 megabyes

3. Check Memory size in Solaris using prtconf :

# prtconf -v |grep Mem

Memory size: 512 Megabytes

Running prtconf with –v shows memory size in megabytes

How to check Linux release/update in RHEL/fedora/CentOS

ref : http://sysdigg.blogspot.com/2007/12/how-to-check-linux-releaseupdate-in.html
How to check Linux release/update in RHEL/fedora/CentOS

To upgrade fedora, centos and Redhat enterprise Linux you need to know what release and what update you are currently running on your server. You can check release by running uname –r, but uname –r shows kernel release not the Linux OS release/updates. Here is how you can check Linux OS release and updates:

In Redhat enterprise linux,fedora and centos to check update running :

In Redhat enterprise Linux 5 (RHEL5) to check release and update run command:

#cat /etc/redhat-release

Red Hat Enterprise Linux Server release 5.1 (Tikanga)

Looking into redhat-release file contents reveals that my Linux server is running Redhat Enterprise Linux release (RHEL5) 5.1 and base OS namaed Tikanga.

In Redhat enterprise Linux 4(RHEl4) to check release and update run command:

[root@svn ~]# cat /etc/redhat-release

Red Hat Enterprise Linux ES release 4 (Nahant Update 3)

This Linux server running RHEL4 (code name= Nahant) with installed update 3.

In Fedora to check release and update run following command:

#cat /etc/redhat-release

Fedora release 8 (Werewolf)

This Linux server running Fedora 8 and base OS named Werewolf

On Debian I don't find any command to check Linux OS update. If anyone find the command to check what debian update is installed please let me know. However I find glimpse of

Update in /etc/issue:

#cat /etc/issue :

Debian GNU/Linux 4.0 \n \l

How to Check Disk space in Linux

ref : http://sysdigg.blogspot.com/2008/03/how-to-check-disk-space-in-linux.html
How to Check Disk space in Linux

For Linux beginners sometimes it's very hard for them to perform simple administration tasks like check available disk space. I know some Windows folks at my work who tried to get their hands into Linux so they installed Fedora 8 on PC. But soon they realized that they couldn't do some basic tasks like check free disk space, sharing directories, configuring printers etc etc to name a few. Checking disk space I Linux is not very difficult in Linux .There are two ways to check disk space in Linux

* Check disk space in Linux using command line
* Check disk space in Linux by using Graphical tool if you have some sort of graphical desktop installed.

Check disk space using command line in Linux:

Open command terminal

window if you are running Graphical windows manager. If you don't know how to open

command terminal window see how

Run df –h , UNIX friendly way is to run df –k but if want disk

space displayed in Megs and Gigabytes then use df –h :

[root@fedoradev]# df -h

Filesystem Size Used

Avail Use% Mounted on

/dev/mapper/vgroot-lvroot

20G 12G 7.2G 62% /

/dev/cciss/c0d0p1 97M 16M 76

M 18% /boot

none 2.0G 0 2.0G 0% /dev/shm

/dev/mapper/vgdata-lvdata 22G 62G 245G 21% /data

Check disk space in Linux using GUI:

From command line run command:

[root@fedoradev # baobab &

OR

From desktop Select Systems Tools from Applications and then select Disk usage analyzer, this will launch a GUI window.

Select Filesystem icon

if you want to check the disk space for the file systems or select Folder icon if you want to see disk space for each and every directory on your Fedora machine

How to check Memory size in Linux

ref : http://sysdigg.blogspot.com/2007/12/how-to-check-memory-size-in-linux.html
How to check Memory size in Linux

In all Linux operating Systems memory size can be checked by running dmesg,free, top and using Kernel proc information. Linux is very cool it offers various pre-installed tools and commands to check memory size compared to UNIX Operating systems.

To check memory size in Linux using dmesg, run the following command:

[root@earth ~]# dmesg |grep -i memory

Memory: 4084332k/4653052k available (1868k kernel code, 43456k reserved, 755k data, 180k init, 3211208k highmem)

Running dmesg command in Linux displays memory in kilobytes, on this Linux server total memory size is 4 Gg.For checking memory dmesg command is also available in Solaris and HP-UX.To check memory size in linux using /proc information run following from the command line:

[root@svn ~]# cat /proc/meminfo |grep -i memtotal

MemTotal: 4086484 kB

/proc/meminfo shows total memory size configured as 4086484 displayed in kilobytes (KB).

To check memory size on Linux using free command, run the following:

[root@svn ~]# free

total used free shared buffers cached

Mem: 4086484 4033924 52560 0 71764 3122188

-/+ buffers/cache: 839972 3246512

Swap: 4194216 376 4193840

Free command on linux also displays used,free memory,cached memory ,shared and memory

buffer size. You can use –m option to check Linux memory utilization in megabytes:

[root@svn ~]# free -m

total used free shared buffers cached

Mem: 3990 3523 467 0 69 2649

-/+ buffers/cache: 804 3185

Swap: 4095 1 4094

Linux also comes with top command, top can be run to check real memory size and memory utilization.Top display total memory size,used memory,free memory ,memory buffers size and swap memory utilization :

top - 08:05:36 up 6 days, 16:46, 7 users, load average: 0.07, 0.09, 0.08

Tasks: 131 total, 1 running, 130 sleeping, 0 stopped, 0 zombie

Cpu(s): 4.2% us, 0.5% sy, 0.0% ni, 95.3% id, 0.0% wa, 0.0% hi, 0.0% si

Mem: 4086484k total, 3609956k used, 476528k free, 71752k buffers

Swap: 4194216k total, 1100k used, 4193116k free, 2713504k cached

Ubuntu and fedora linux also comes with package called lshw (list hardware) which provides

detailed information on memory size, how many memory dims available, memory slots free along with other Linux system Hardware information .Run lshw and scroll down to *-memory section :

#lshw |grep

*-memory

description: System Memory

physical id: 39

slot: System board or motherboard

size: 1GB