VPS swap memory is 0

torboy

Joined
Apr 30, 2009
Messages
37
Likes
0
Points
0
#1
After 2 weeks of trying finally was able to install Elastix 1.5.2 on VPS but my 384MB memory is not enough and the swap is set to zero how can I change that.

Code:
top - 22:21:21 up  4:31,  1 user,  load average: 0.43, 0.47, 0.46
Tasks:  73 total,   1 running,  72 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.0%sy,  0.0%ni, 75.0%id, 25.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:    393216k total,   385948k used,     7268k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

thanks
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
just to normalize:
(from bash as root)

swapon -a

to mount all swap entries in fstab

free

to see if there is any swap space. if still none, back to basics . .

cat /etc/fstab

will show you your mounted partitions swap and otherwise, it will normally largely reflect the output of

fdisk -l /dev/<hdd>

which will identify any swap partitions on the HD

if you have a partition with ID 82 (swap) feel free to add it to fstab (perhaps mkswap it first, just for shits and grins) (it should be there already) , if not you can make a file, mkswap it and add it as swap space to fstab (google is your friend).

If you need to make a swap file, I suggest you don't make it bigger than 512K given your physical memory or you will thrash yourself to death under load. (and your already at .4+ )

a final

swapon -a
free

will confirm the efficacy of your process.

[edit]
whoops I see we are here in Newbies, but if you got this far I will assume have the resourcefulness to take it from here, Please excuse my terseness!
 

torboy

Joined
Apr 30, 2009
Messages
37
Likes
0
Points
0
#3
You are right, I am newbie!
could you explain in more detail on codes

[root@pbx ~]# cat /etc/fstab
none /dev/pts devpts rw 0 0
[root@pbx ~]# fdisk -l /dev/pts
last_lba(): I don't know how to handle files with mode 41ed
[root@pbx ~]# fdisk -l /dev/*
last_lba(): I don't know how to handle files with mode 41ed
Cannot open /dev/console
Cannot open /dev/core
last_lba(): I don't know how to handle files with mode 4140
last_lba(): I don't know how to handle files with mode 21b6

Disk /dev/full: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/full doesn't contain a valid partition table

[1]+ Stopped fdisk -l /dev/*
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
OK,


please post the output of

mount

which lists the mounted file systems

and

cat /proc/partitions

which will describe the partitions available on your disk(s)
 

torboy

Joined
Apr 30, 2009
Messages
37
Likes
0
Points
0
#5
Code:
[root@pbx ~]# mount
simfs on / type simfs (rw)
/proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

[root@pbx ~]# cat /proc/partitions
cat: /proc/partitions: No such file or directory
on a different note:

Everytime I restart my VPS I have to type asterisk in CLI so asterisk starts.
How can I added asterisk to start at bootup
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
then with the file system you have, you are restricted to using a swapfile if you want to see swap space, it is possible that the virtualization manages swap space outside the physical machine, I would ask them first.

if you want a swap file

dd if=/dev/zero of=/swapfile bs=1024 count=512
mkswap /swapfile

and add it to fstab to be mounted at boot time

/swapfile swap swap defaults 0 0

swapon -a
and
free (or as you used, top)

will then I hope show you have swap space.
 

torboy

Joined
Apr 30, 2009
Messages
37
Likes
0
Points
0
#7
and how to start asterisk at bootup
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#8
Ahh!

init scripts!!

the init scripts are normally in /etc/rc.d, do you have that? they are softlinked to the different "run level" structures for example /etc/rc.d/rc3.d (run level 3) should have a bunch of files in it (does it?) the scripts are called sequentially at startup S00* then S01* etc and on shutdown K99* (K for kill) then K98* etc..

If you have a standard script called setup in your Centos build you can turn on and off what you want/need S90asterisk would normally be present and be a softlink to /etc/init.d/asterisk

unless you hacked it all to pieces (then google would be your friend) I think even in your environment these structures should exist, does it not start right now on boot?
 

bucasia

Joined
Feb 15, 2009
Messages
36
Likes
0
Points
0
#9
There's a good chance if there's no swap memory that this is an OpenVZ VPS which doesn't support swap memory at all on the VPS
 

chopeta

Joined
Jun 18, 2009
Messages
10
Likes
0
Points
0
#10

rafael

Joined
May 14, 2007
Messages
1,454
Likes
1
Points
0
#11
torboy,

If you can manage to create a openVZ template we would be more than glad to uplad it to the sourceforge website.

best regards,

Rafael
 

torboy

Joined
Apr 30, 2009
Messages
37
Likes
0
Points
0
#12
I downloaded elastix ISO files on my home pc, unpack using zip7, copied all the files to VPS /mnt/elastix-cd and them followed instruction after
Code:
ls /mnt/elastix-cd/Elastix/kernel-2.*
It wasnt working very good I kept running out of memory I had 256MB RAM. basicly I could access my UI for elastix or freePBX only 3 or 4 times before I would run of out memory.

finally I bought a Template from anther person. the Template is working fine except hylafax is not working properly. my ram is now 384MB
 

chopeta

Joined
Jun 18, 2009
Messages
10
Likes
0
Points
0
#13
torboy said:
finally I bought a Template from anther person. the Template is working fine except hylafax is not working properly. my ram is now 384MB
I think I found the reason why we don't have a OpenVZ template for Elastix :)

Maldita sea!

Refa, let me know as soon as you got the email with the template from elkabong.

Regards,
chopeta
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,982
Messages
131,061
Members
17,705
Latest member
simulanis
Top