Jump to content


Photo

How to create swapfile in pli?


  • Please log in to reply
10 replies to this topic

#1 jalizi

  • Member
  • 27 posts

0
Neutral

Posted 29 May 2015 - 13:17

Hi

 

How to create swapfile in pli? I mean, which plugin should be used or which command I should run in telnet to create swapfile in pli image?

 

Regards



Re: How to create swapfile in pli? #2 doglover

  • Rytec EPG Team
  • 17,008 posts

+638
Excellent

Posted 29 May 2015 - 14:03

Install the extension "System Tools"

Here is an option Swap file.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: How to create swapfile in pli? #3 Autodelta

  • Senior Member
  • 356 posts

+12
Neutral

Posted 30 May 2015 - 13:19

Here is an example

 

http://www.world-of-...ting-a-Swapfile


Edited by Autodelta, 30 May 2015 - 13:19.

Vu+Solo2 PLi 4.0 1 TB HD Triax 88 28, 23.5, 19.2, 13


Re: How to create swapfile in pli? #4 doglover

  • Rytec EPG Team
  • 17,008 posts

+638
Excellent

Posted 30 May 2015 - 15:36

 

Why so complicated. The System tools plug-in does this all for you.

And some of the commands used in this example do not work  anymore in OpenPLi.

 

Willy


~~Rytec Team~~
Maxytec Multibox SE OpenPli (used as mediaplayer)
Mutant HD2400 OpenPli
Vu+ Duo OpenPli (backup)

Synology NAS

Sat: 13E, 19.2E, 23.5E and 28.2E
*Pli/Rytec EPG POWERED*


Re: How to create swapfile in pli? #5 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 31 May 2015 - 04:48

It's nice for a user to have the option to actually learn something. This terribly "complicated" method would allow a user to create a swapfile on any Linux based box, ranging from $ routers to  $$$$ computers & anything inbetween... No crutches required. ;)

 

--

hemi



Re: How to create swapfile in pli? #6 gabier

  • Member
  • 21 posts

0
Neutral

Posted 31 May 2015 - 09:07

 

Why so complicated. The System tools plug-in does this all for you.

And some of the commands used in this example do not work  anymore in OpenPLi.

Willy

I can report my experience. I tried to install a swap on an usb stick on my DM8000 openpli 4.0.

I first used Glass System Utilities plugin. There is a prerequisite that your USB stick is formatted in ext3 or ext4. Even so, the plugin installed the swap file but the "used" space was stuck to zero for ever. I suspect this swap file did not really work. I suspect there is a partition issue. My stick was formatted without any partition and the system utilities (or openpli) would require at least a partition in order to install the swap correctly.

Anyway, I deleted the swap and recreated it from the command line with telnet, exactly following the example in autodelta's post. It did install correctly the swap file and now it is  working, the "used" space is 120K. The only problem I had is that I have not yet succeeded in the fstab issue, If I reboot the box, I have to telnet a "swapon".

I must confess also that between the 2 implementations, I reformated the stick with a partition. Maybe this is mandatory in openpli, I do not know.

Also doglover is right when writing that some commands do not work, but for me it happened only for the "free" command. I use "cat /proc/meminfo" instead, but the output is too big. There is also the "cat /proc/swaps". It displays only swap stats.

 

:) gabier



Re: How to create swapfile in pli? #7 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 1 June 2015 - 06:40

I suspect the free command may have been conciously removed from the default install, in an attempt to bring an end to the requests from people about how to "flush" their RAM, as they felt they had too little "Free" ram... Along with no comprhension about how Linux memory management worked...

 

Just a guess from years of reading those posts...   ;)

 

 

I'm not sure what the problem is you're having with the fstab, the vi command as listed in the link assumes the user knows how to use the vi editor, basic vi commands are easily googlable. It'd be something like <ignore the comments>

 

vi /etc/fstab

i <insert mode to add text>

/media/usb/swapfile swap swap defaults 0 0 <as the example in the link>

esc <enter command mode>

:wq <write changes and quit on the Enter key>

Enter

 

Of course you could use any editor besides vi that you like & install.

 

Happy learning,

--

hemi



Re: How to create swapfile in pli? #8 shangi

  • Senior Member
  • 27 posts

+2
Neutral

Posted 3 June 2015 - 13:43

Install the extension "System Tools"

Here is an option Swap file.

 

Willy

Where i could found the extension "System Tools" opkg ?

Thanks



Re: How to create swapfile in pli? #9 Robinson

  • Senior Member
  • 2,616 posts

+30
Good

Posted 3 June 2015 - 14:15

Install it from the feed (from your box menu) and then you will find it under BLUE.


ET9000, OpenPLi 4.0, 13E, 19E

HD51, OpenPLi 6.2, 75E - 30W


Re: How to create swapfile in pli? #10 shangi

  • Senior Member
  • 27 posts

+2
Neutral

Posted 3 June 2015 - 22:04

Ok thanks, its ok now !!!



Re: How to create swapfile in pli? #11 ims

  • PLi® Core member
  • 13,623 posts

+212
Excellent

Posted 4 June 2015 - 17:13

create swapfile in several steps (this example is for 64MB size, on /media/usb):

 

in telnet:

dd if=/dev/zero of=/media/usb/swapfile bs=1024 count=64k
mkswap /media/usb/swapfile
chmod 0777 /media/usb/swapfile

then add on end into /etc/fstab line:

/media/usb/swapfile swap swap defaults 0 0

and restart box


Kdo nic nedělá, nic nezkazí!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users