LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-01-2006, 05:29 AM   #1
hinetvenkat
Member
 
Registered: Nov 2004
Location: Mumbai
Posts: 80

Rep: Reputation: 15
Swap file - identification


Dear People

How the see the list of Swap spaces in Linux.

Normal we can identify through mount command or fdisk command. but in solaris " swap -l ", this will show all swap device / swap files.

How about in linux. any command for identify the devices / files.

Kindly address this.

Thanks
 
Old 04-01-2006, 05:49 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
You could check the output of dmesg. For example:
Code:
# dmesg |grep swap
Adding 594396k swap on /dev/sda3.  Priority:-1 extents:1 across:594396k
Adding 594396k swap on /dev/sdb3.  Priority:-2 extents:1 across:594396k
The command free might be of some help also.
 
Old 04-01-2006, 01:59 PM   #3
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
On Slackware, the swapon command uses the -s option:
Code:
$ /sbin/swapon -s
Filename                                Type            Size    Used    Priority
/dev/hda10                              partition       987956  194220  -1
Or, you can just check the /proc info:
Code:
$ cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/hda10                              partition       987956  194220  -1
 
Old 04-01-2006, 05:29 PM   #4
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If procfs is mounted at /proc, type cat /proc/swaps.

In any distribution, typing swapon -s will give you the list of swaps. This command is not proprietary for Slackware.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
what is a swap file...? zameer_india Linux - Newbie 8 01-09-2005 10:35 PM
swap file linuxhippy Linux - General 4 10-11-2004 04:07 PM
Swap file not being used...why? ganja_guru Linux - General 6 12-08-2003 03:41 AM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 09:09 AM
Swap File ? jbhoo Linux - Software 1 04-24-2002 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration