Results 1 to 5 of 5

Thread: How to find swap in Solaris UNIX

  1. #1
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    566
    Thanks
    57
    Thanked 41 Times in 38 Posts
    Rep Power
    14

    Default How to find swap in Solaris UNIX

    how do i find out swap space? I am using Solaris UNIX
    Raj
    Linux rulz.
    I have never turned back in my life ; I shall not do so today.. haha

  2. #2
    Junior Member
    Join Date
    Feb 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default to view swap space in solaris

    Use following commands to view swap space in solaris-unix
    #swap -l
    #swap -s

  3. #3
    Junior Member
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Cool

    also you can use
    df -k swap
    top

  4. #4
    Member
    Join Date
    Oct 2007
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Lightbulb

    Quote Originally Posted by nvartak View Post
    also you can use
    df -k swap
    This could give wrong values; like in my case.

    Code:
     
    # df -kh swap
    Filesystem             size   used  avail capacity  Mounted on
    swap                   1.9G   288M   1.7G    15%    /tmp
    
    # top -d1 | grep "total swap"
    Memory: 2048M phys mem, 306M free mem, 3076M total swap, 2446M free swap
    
    # swap -s
    total: 1979944k bytes allocated + 1009544k reserved = 2989488k used, 1733408k available
    Best option, as per me would be top -d1 | grep "total swap"

    Regards,
    VIKAS

  5. #5
    Junior Member
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Quote Originally Posted by vikas027 View Post
    This could give wrong values; like in my case.

    Code:
     
    # df -kh swap
    Filesystem             size   used  avail capacity  Mounted on
    swap                   1.9G   288M   1.7G    15%    /tmp
    
    # top -d1 | grep "total swap"
    Memory: 2048M phys mem, 306M free mem, 3076M total swap, 2446M free swap
    
    # swap -s
    total: 1979944k bytes allocated + 1009544k reserved = 2989488k used, 1733408k available
    Best option, as per me would be top -d1 | grep "total swap"

    Regards,
    VIKAS
    Hi VIKAS,

    Our system has some value below :
    Hardware : Sun M5000
    OS : Sun Solaris 10

    1. Checking current swap usage :
    root@test # swap -s
    total: 30572104k bytes allocated + 264744k reserved = 30836848k used, 29789760k available
    2. Checking config swap space :
    root@test # swap -l
    swapfile dev swaplo blocks free
    /dev/md/dsk/d20 85,20 16 40962480 40962480
    3. Current hard disk usage on server :
    root@test # df -h
    Filesystem size used avail capacity Mounted on
    /dev/md/dsk/d10 106G 13G 91G 13% /
    /devices 0K 0K 0K 0% /devices
    ctfs 0K 0K 0K 0% /system/contract
    proc 0K 0K 0K 0% /proc
    mnttab 0K 0K 0K 0% /etc/mnttab
    swap 28G 1.5M 28G 1% /etc/svc/volatile
    objfs 0K 0K 0K 0% /system/object
    sharefs 0K 0K 0K 0% /etc/dfs/sharetab
    fd 0K 0K 0K 0% /dev/fd
    swap 28G 17M 28G 1% /tmp
    swap 28G 32K 28G 1% /var/run
    swap 28G 0K 28G 0% /dev/vx/dmp
    swap 28G 0K 28G 0% /dev/vx/rdmp
    /dev/md/dsk/d60 995M 1.0M 934M 1% /globaldevices
    /dev/vx/dsk/ossdg/exporthome
    610G 80G 524G 14% /export/home
    4. Show swap current usage on mouted partition :
    root@test # df -kh swap
    Filesystem size used avail capacity Mounted on
    swap 28G 0K 28G 0% /dev/vx/rdmp
    5. Show vfstab file :
    root@test # cat /etc/vfstab
    #device device mount FS fsck mount mount
    #to mount to fsck point type pass at boot options
    #
    fd - /dev/fd fd - no -
    /proc - /proc proc - no -
    /dev/md/dsk/d20 - - swap - no -
    /dev/md/dsk/d10 /dev/md/rdsk/d10 / ufs 1 no -
    /dev/md/dsk/d60 /dev/md/rdsk/d60 /globaldevices ufs 2 yes -
    /devices - /devices devfs - no -
    sharefs - /etc/dfs/sharetab sharefs - no -
    ctfs - /system/contract ctfs - no -
    objfs - /system/object objfs - no -
    swap - /tmp tmpfs - yes -
    /dev/vx/dsk/ossdg/exporthome /dev/vx/rdsk/ossdg/exporthome /export/home ufs 2 yes logging
    5. Running your command above :
    root@test # top -d1 | grep "total swap"
    -bash: top: command not found
    The question is : Which value I should focus to calculate the Swap Mermory Usage (KB) ?

    1. Which value is Total Swap Memory ?
    2. Which value is Current Swap Memory Usage ?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 5th February 2009, 12:59 AM
  2. Solaris UNIX Open comparessed tar file
    By tom in forum Solaris/OpenSolaris
    Replies: 1
    Last Post: 27th August 2008, 05:50 PM
  3. unix find out ram usage command
    By charvi in forum Solaris/OpenSolaris
    Replies: 4
    Last Post: 10th April 2008, 02:22 AM
  4. Difference between Linux Swap partition & Swap file
    By hrishikesh in forum Linux software
    Replies: 9
    Last Post: 16th March 2007, 02:08 AM
  5. Sun Solaris UNIX VI cursor keys problem fix
    By monk in forum Solaris/OpenSolaris
    Replies: 0
    Last Post: 4th January 2007, 10:54 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •