SWAP command not working on Linux machine


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers SWAP command not working on Linux machine
# 1  
Old 07-13-2013
Question SWAP command not working on Linux machine

Hi
I am working on linux machine and swap command is not working Linux Machine
On Solaris machine it is working fine:
Code:
uname -a
SunOS rgsm01 5.9 Generic_118558-03 sun4u sparc SUNW,Sun-Fire-V440
swap -s
total: 6596320k bytes allocated + 1035968k reserved = 7632288k used, 38893408k available

But on linux machine it is giving following errors:
Code:
uname -a:
Linux GURKES060 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
 
swap -s
-ksh: swap: not found [No such file or directory]

Can anybody help me out?

Last edited by Scott; 07-13-2013 at 04:02 AM.. Reason: Please use code tags
# 2  
Old 07-13-2013
Maybe you are looking for the swapon command?

I don't know what Linux you are running.
# 3  
Old 07-13-2013
Question

swap on command is giving following output:
Code:
swapon -s
Filename                                Type            Size    Used    Priority
/dev/sda3                               partition       65535992        0       -1


And swap -s was giving:
Code:
swap -s
total: 6599240k bytes allocated + 1042064k reserved = 7641304k used, 38884192k available


Here I need reserved bytes as"1042064k reserved ".

Last edited by Scott; 07-13-2013 at 12:11 PM.. Reason: Code tags
# 4  
Old 07-13-2013
Information about memory is different on different OS.
Linux command free is comparable with swap -s.
# 5  
Old 07-13-2013
Question

Yup,but I need
'The total amount of swap space in bytes not currently allocated, but claimed by memory mappings for possible future use.'
This is not given by free command
# 6  
Old 07-13-2013
Isn't it Linux philosophy to not think of swap before the last piece of memory is used up? And answer question "why is paging so slow" with "get more RAM"?
So simply assume 0, and for safety buy more RAM!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Simple sed command not working; could be a Mac/Linux vs. PC/Linux issue

Hello, I am on a Mac and trying to clean up some monthly files with a very simple SED: sed '3,10d;/<ACROSS>/,$d' input.txt > output.txt (from the input, delete lines 3 - 10; then delete from the line containing <ACROSS> to the end of the file) then output to output.txt Even when I try... (2 Replies)
Discussion started by: verbatim
2 Replies

2. Red Hat

isql command not working in Linux 64bit

I am using Linux RHEL5 64 bit and installed oracle 11g. I want to check ODBC connection , i had modified odbc.ini file when i use this command -isql I am getting following error . bash: isql: command not found Kindly help (5 Replies)
Discussion started by: roopalidalvi231
5 Replies

3. Shell Programming and Scripting

AWK command working different in Linux

Hi All I have fired a command in linux table=`echo ${file_name} | awk '{FS="/"; print $NF}' | awk '{FS="."; print $1}'` where file_name has /data/ds/dpr_ebicm_uat/backfill/temp/etl_app_info.csv /data/ds/dpr_ebicm_uat/backfill/temp/etl_app_jobs.csv ... (10 Replies)
Discussion started by: vee_789
10 Replies

4. Shell Programming and Scripting

sed command working different in linux environment.

Hi I tried running the code scrname=`whence $0 | sed -e 's/\.\///g'` where $0 is substituted by cm_dsjobrun.sh in unix env then the value it returns me is SCRNAME=/data/ds/dpr_ebicm_uat/etl/cm3_0/scripts/shell/cm_dsjobrun.sh whereas i ran the same code on linux env The value... (9 Replies)
Discussion started by: vee_789
9 Replies

5. UNIX for Dummies Questions & Answers

Trying to get mail working on a Linux machine

I tried using the mail command on one of our Linux machines to send email, and it works fine. I tried using the same command on another one of our Linux machines, and it didn't work (no error message was returned either). The machine that works has the following version information:... (2 Replies)
Discussion started by: sllinux
2 Replies

6. HP-UX

Mirrored root and swap HP9000 machine

How do I check if the root and swap are mirrored on my HP9000 machine? Thank you, N. (33 Replies)
Discussion started by: NicoMan
33 Replies

7. Programming

cos() command not working in Linux

Hi, I have written a c program to find cos() of a value , its not working, I am getting value of "val " as 0000. #include<stdio.h> #include<math.h> main() { float val; val = cosf( 1.570796); printf("\nval = %f",val); } (9 Replies)
Discussion started by: shashi
9 Replies

8. UNIX for Dummies Questions & Answers

Link type between working machine and server machine

There are two servers where my machine is connected. Is there any type of link formed between my machine and server machine? (1 Reply)
Discussion started by: palash2k
1 Replies

9. Red Hat

Command to set locale for my linux machine

Hi, I need to set a locale to my linux machine which has redhat enterprise linux 4 how should I do that. And also when i did locale -a, I have got three versions for each locale type with different .extensions like utf8,iso88951 and soon which file should I use for setting locale. ... (1 Reply)
Discussion started by: eamani_sun
1 Replies

10. Solaris

formula to get the swap space on a machine

Hello there are different opinions on how to get the swap space on Solaris. some say: swap -s and the space= used + available others say swap -l (donno how they get the swap size) other say 'top' command others say using format command (in print sub-command) Could you please advise on... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies
Login or Register to Ask a Question