Monday, December 23, 2013

Save scripts in vi editior it showing swap file error

www.unixbabuforum.inWhen i am trying save scripts in vi editior it showing swap file error(no space*** 
how get rid from it


www.unixbabuforum.inIt seems the swap space is full and you need add sum space to do it.. 

So try the below.. 

1 Add the new partition as swap space. 
swap -a /dev/dsk/cxtxdxsx 
# swap -a /dev/dsk/c0t9d0s0 Or, create the swap file. 
mkfile filename 
# mkfile 100m /swapfile 
2 Check that new swap has been added. 
# swap -s 
total: 35760k bytes allocated 4288k reserved = 40048k used, 1289872k available 
3 To make it permanent across reboots, use your preferred editor to add a line to the /etc/vfstab file reflecting the new swap, for example: 

/dev/dsk/c0t1d0s1 - - swap - no - 
/swapfile - - swap - no - 

# /etc/vfstab 
#device device mount FS fsck mount mount 
#to mount to fsck point type pass at boot options 

fd - /dev/fd fd - no - 
/proc - /proc proc - no - 
/dev/dsk/c0t0d0s1 - - swap - no - 
/dev/dsk/c0t9d0s0 - - swap - no - 
/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - 
/dev/dsk/c0t0d0s4 /dev/rdsk/c0t0d0s4 /usr ufs 1 no - 
/dev/dsk/c0t0d0s3 /dev/rdsk/c0t0d0s3 /var ufs 1 no - 
/devices - /devices devfs - no - 
ctfs - /system/contract ctfs - no - 
objfs - /system/object objfs - no - 
swap - /tmp tmpfs - yes 




"/etc/vfstab" 11 lines, 397 characters 

4 When safe, reboot the system to test. 
# init 6 
5 Check that the new swap has been added. 
# swap -s 
total: 30760k bytes allocated 4168k reserved = 34928k used, 1296288k available.. 


www.unixbabuforum.incheck FS space and swap space 

df -k * 
swap -l 

www.unixbabuforum.inYou're running out of total system memory. 

Check your system by running: 

swap -l 

On my server, you'd see: 
swapfile dev swaplo blocks free 

/dev/zvol/dsk/spool/swap01 182,3 8 8388600 8353848 

if that last row is near 0, then you need to add more swap. 
Or more memory, but that's expensive. You'll need to identify 
some suitable storage (it can be a file, but not a file on a 
disk that is supporting your RDBMS or application logs.) man swap 
for more information. 

once you have a suitable device: swap -a /dev/.../device 

to swap on a file, use lofiadm to turn a file full of 0s (not a 
big sparse empty file) into a dev for a while. 

sh# mkfile -s 1G /path/to/file 
sh# lofiadm -a /path/to/file 
/dev/lofi/1 
sh# swap -a /dev/lofi/1



0 comments:

Post a Comment

 
Design by BABU | Dedicated to grandfather | welcome to BABU-UNIX-FORUM