- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- get SWAP Space
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 04:33 AM
05-16-2005 04:33 AM
How can I get the swap space of my system?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 06:08 AM
05-16-2005 06:08 AM
Re: get SWAP Space
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 08:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 08:12 AM
05-16-2005 08:12 AM
Re: get SWAP Space
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 08:27 AM
05-16-2005 08:27 AM
Re: get SWAP Space
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 08:33 AM
05-16-2005 08:33 AM
Re: get SWAP Space
You can do "free -m" to view the amounts in megabytes, at the bottom you'll see the swapsize.
Also, you can look into /proc/meminfo, there at the bottom, you'll see the swap size too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 01:59 PM
05-16-2005 01:59 PM
Re: get SWAP Space
If you wan't to script it in the future, it's easiest to grab it directly from '/proc/meminfo', using something like 'grep ^Swap: /proc/meminfo'. These are the same numbers as shown in the 'top' output. It shows the number of 'bytes' allocated as swap, how many are in use, as well as how many are currently free.
To get a running idea of how swap is being used, you can use something like 'vmstat -ban 1', which takes a sample every second, and shows swap-in, and swap-out (si/so).
If you want general overview over a longer period of time, install the 'sysstat' RPM and use 'sar -r' (and it's variants).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2005 06:15 PM
05-16-2005 06:15 PM
Re: get SWAP Space
if you want to know available and used swap and RAM memory information run, free -m
it will give information in Megabytes. if you want to continuously watch for system memory, cpu and process related information then use top command.
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2005 01:51 AM
05-17-2005 01:51 AM
Re: get SWAP Space
/usr/bin/free | /bin/grep Swap: | /bin/awk '{printf "Swap: %5d MB\n",$2/1024}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2005 05:13 AM
05-22-2005 05:13 AM
Re: get SWAP Space
If you want it by swap partition/file rather than all totalled up:
cat /proc/swaps
Mike