Sponsored Content
Top Forums Shell Programming and Scripting calculate swap space usage in Solaris and converts it in Percentage Post 302469458 by jaapar on Saturday 6th of November 2010 10:10:45 AM
Old 11-06-2010
Hi Jim,

Thanks for the effort, but the output looks wrong when I executed in my Solaris box.

Code:
swap -l | tail -1 | awk '{ printf("%.2f\n", 100 * ($5/$4))}'
100.00


This is output for swap -s

Code:
swap -s
total: 140936k bytes allocated + 9448k reserved = 150384k used, 43186440k available


Cheers!
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

creating swap space under Solaris 2.6

I just finished installing Solaris 2.6 and several applications just to realize that I made a bonehead mistake during the install. When setting up the filesystems, I entered /tmp and no swap! Is it possible to permanantly declare the entire /tmp partition as swap? I am guessing an entry in the... (4 Replies)
Discussion started by: 98_1LE
4 Replies

2. Shell Programming and Scripting

swap space and cpu usage for an application

Hi, How do i get the swap space used and cpu usage for a particular application ? thanks una (2 Replies)
Discussion started by: una
2 Replies

3. UNIX for Advanced & Expert Users

allocating swap space on solaris 9

Hi, I have a solaris 9-sparc box, which after bouncing is giving swap space related error messages(that swap space is not enough). could it be possible that there was some command issued or setting made before bouncing, which was lost after bouncing? please let me know how i can add swap space... (1 Reply)
Discussion started by: 0ktalmagik
1 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. Solaris

Releasing the swap space Solaris

Hi Guys ! I have found this problem many times that the swap space (/tmp space more precisely )of my Server becomes full specially when i run a complete back up of the server . once the /tmp space is full I am not able to run simple commands as i get error like : fork no space on... (6 Replies)
Discussion started by: Paarth
6 Replies

6. Solaris

Releasing the swap space Solaris

Hi Guys ! I have found this problem many times that the swap space (/tmp space more precisely )of my Server becomes full specially when i run a complete back up of the server . once the /tmp space is full I am not able to run simple commands as i get error like : fork no space on... (4 Replies)
Discussion started by: Paarth
4 Replies

7. Solaris

Solaris 10 SWAP SPACE

We have a SPARC system which is running on Solaris-9 and Physical memory size is 16GB.We have allocated 32GB SWAP space(2 times of physical memory).But when we use df -h command it shows following output and SWAP space size shows more than our allocated space # df -h Filesystem size used... (2 Replies)
Discussion started by: cyberdemon
2 Replies

8. Solaris

Swap space in Solaris box

Hello Team, By the way of introduction, I am new member in this forum and proud too :) Here is my questions: In one of our Solaris Sparc v9 box, we are facing issues related to swap space. Our custom applications are using swap space even though physical memory is available. From some... (3 Replies)
Discussion started by: piyush_28
3 Replies

9. Shell Programming and Scripting

Calculate Percentage

Hello, Ive got a bunch of numbers here e.g: 6065 6094 6348 6297 6161 6377 6338 6290 How do I find out if there is a difference between 10% or more between one of these numbers ? I am trying to do this in Bash.. but no luck so far.. Does anyone have an Idea ?? Thanx, - Pascal... (9 Replies)
Discussion started by: denbekker
9 Replies
SWAP-OFFSET(8)							    swap-offset 						    SWAP-OFFSET(8)

NAME
swap-offset - program to calculate the offset of a swap file in a partition SYNOPSIS
swap-offset [<swap_file>] DESCRIPTION
This manual page documents briefly the swap-offset. This manual page was written for the Debian(TM) distribution because the original program does not have a manual page. The programs s2disk and s2both can be used to save the state of the whole system to a swap partition or file and power off or suspend your system. After restarting your system it will be put back in the exact system state you left it (this is sometimes called hibernation). In the case of using a swap file you will have to specify the location of the swap file's header as the offset from the beginning of the partition that contains the swap file. The swap-offset utility can be used to determine this value. SEE ALSO
uswsusp.conf(8), s2disk(8) For more information see the HOWTO and the README AUTHOR
This manual page was written by Tim Dijkstra tim@famdijkstra.org for the Debian(TM) system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. AUTHOR
TimTim DijkstraDijkstra <tim@famdijkstra.org> <tim@famdijkstra.org> Wrote this manpage for the Debian system. COPYRIGHT
Copyright (C) 2006 Tim Dijkstra uswsusp juni 24, 2006 SWAP-OFFSET(8)
All times are GMT -4. The time now is 06:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy