Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about temp partition and swap files .

Status
Not open for further replies.

microsky

MIS
May 7, 2001
33
Under Solaris 2.6,I found a problem when I calculate the
swap files size ,as following showing ,in the feedback of
command 'swap -l' the swap file size is
3669984*512=1834992(Kbytes) .But in the command 'swap -s'
it show me the swap space is
1621176k+2737240k=4358416(Kbytes) .In command of 'df -k' ,
it show me the location of swap partition is
/dev/md/dsk/d1 and the size is 1.75Gbytes .
Anybody know which one is correct,why ?
Thanks !
=======================================================
$ swap -l
swapfile dev swaplo blocks free
/dev/md/dsk/d1 85,1 16 3669984 2936400
$ swap -s
total: 1572336k bytes allocated + 48840k reserved = 1621176k used, 2737240k available
=======================================================
 
The man page will tell you swap -s includes physical memory and -l does not. If you're looking for swap file system, then I would guess to use swap -l.
 
Reading the output of the swap -s command is often confusing because the command mixes up the terms reserved and allocated
swap -s commnads reads the kernel directly to obtain a snapshot of current anoninfo values

read more this article
.

Farah regal
good luck
"think twice and hit enter once"
 
You can also run vmstat: -

vmstat 2 5

will run command 5 times at 2 second intervals and display swap and free memory in
4yth & 5th column. Shows amount of swap space currently available. Please ignore the 1st line of data displayed though.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top