InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Ubuntu tutorials

  • How to add a user on Linux with sudo access
  • How to check if a user has password on Linux
  • How to install ViewVC for svn repository on Ubuntu Linux
  • How to setup ssl (https) for your site on Ubuntu Linux
  • Install rabbitmq on Ubuntu Linux
  • LXC (Linux Containers) - quick start tutorial on Ubuntu
  • Linux - command to check swap size
  • Linux - how to add a user using useradd
  • Linux - how to create a large file like 1GB
  • Linux - how to create swap partition
  • Linux - how to remove user from a group
  • Linux - number of cpus (lscpu)
  • Linux du - find disk usage of directories or files
  • NFS client and server handy commands
  • Setup svn repository on AWS Ubuntu with apache auth
  • Ubuntu - check if a service is upstart based
  • Ubuntu - dpkg and apt-get beginner tutorial
  • Ubuntu - find file to package
  • Ubuntu - find where will a package be installed from
  • Ubuntu - how to auto start services on boot using update-rc.d (sysv init)
  • Ubuntu - how to find boot autostart status of a service
  • Ubuntu - reload iptables rules during boot
  • Use x2go to access remote Ubuntu Linux
 
  • Home
  • > Tutorials
  • > Devops

Linux – command to check swap size

on Apr 15, 2016

Swap space is the area on a hard disk which is part of the Virtual Memory. Swap space temporarily holds memory pages that are inactive.

Some ways to find swap usage on Ubuntu Lunux

Using free

$ free
             total       used       free     shared    buffers     cached
Mem:       1016324     921780      94544      66052      71068     261368
-/+ buffers/cache:     589344     426980
Swap:            0          0          0

Here swap is not configured.

Using /proc/swaps file

$ cat /proc/swaps
Filename				Type		Size	Used	Priority

Using /proc/meminfo

$ grep SwapTotal /proc/meminfo
SwapTotal:             0 kB

Using top

$ top
...
KiB Swap:        0 total,        0 used,        0 free.
...

Using swapon

swapon -s (summary) command lists swap summary

$ swapon -s
Filename				Type		Size	Used	Priority

Suggested posts:

  1. Linux – how to create swap partition
  2. How to upgrade EC2 Ubuntu Linux micro instance to small
  3. How to install and monitor memcache for php on Ubuntu Linux
  4. How to check if an ssh key has passphrase
  5. Find memcache request hit rate on linux command line
  6. Csslint – quick command-line tutorial and how to use it for pre-deployment sanity check
  7. LXC (Linux Containers) – quick start tutorial on Ubuntu
  8. CSS – !important examples
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Devops, Linux, Tutorials, Ubuntu Linux
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2023 InfoHeap.

Powered by WordPress