Scheduled reboot

355 views
Skip to first unread message

James Pike

unread,
Sep 17, 2014, 1:00:59 PM9/17/14
to al...@googlegroups.com
Is there a way to schedule a reboot of the NAS?

Every few days, I have to manually reboot it, as it gets sluggish and I can't access anything, even the web GUI. 

Running DNS-323-C1 Alt-F 0.1RC4

João Cardoso

unread,
Sep 17, 2014, 4:39:40 PM9/17/14
to al...@googlegroups.com


On Wednesday, September 17, 2014 6:00:59 PM UTC+1, James Pike wrote:
Is there a way to schedule a reboot of the NAS?

Services->System->cron, Configure, add a new cron entry, use '/sbin/reboot' as the command to execute.

And before you ask, no, it is not possible to schedule a poweron. 
 

Every few days, I have to manually reboot it, as it gets sluggish

Doesn't stopping services and restarting them solves that?
Did a 'top' or using System->Utilities->View Logs, Running processes reveals any process using too much memory? %VSZ higher than 100% means that swap is being used, which slows down the system.
 
and I can't access anything, even the web GUI. 

Try 'free' or 'top' in the command line to diagnose the situation.
 

Running DNS-323-C1 Alt-F 0.1RC4

James Pike

unread,
Sep 17, 2014, 5:01:34 PM9/17/14
to al...@googlegroups.com
Thanks. Got the Cron job set (had a feeling it'd be something with that)
I made a Cron, for * - 05:00 - /sbin/reboot
Hope the time stamp is right.

Actually, just restarted it, so not able to see anything in the log that's high usage, but will check after running for a few hours. 

Not real good with Linux commands, so not sure how to do a 'top' or 'free' command.

João Cardoso

unread,
Sep 17, 2014, 5:27:19 PM9/17/14
to al...@googlegroups.com


On Wednesday, September 17, 2014 10:01:34 PM UTC+1, James Pike wrote:
Thanks. Got the Cron job set (had a feeling it'd be something with that)
I made a Cron, for * - 05:00 - /sbin/reboot

reboot everyday at 5 AM

If you hold the pointer in the When/At entries a tooltip will appear

 
Hope the time stamp is right.

Actually, just restarted it, so not able to see anything in the log that's high usage, but will check after running for a few hours. 

Not real good with Linux commands, so not sure how to do a 'top' or 'free' command.

Just ssh or telnet the box, login as the 'root' user, same pass as the webUI, and type the commands.
But  System->Utilities->View Logs, Running Processes gives the same info

James Pike

unread,
Sep 17, 2014, 8:36:12 PM9/17/14
to al...@googlegroups.com
Good to know. Been running Alt-F since RC3, and love it. This was the first time I had a question that wasn't already answered in either the FAQ or here on the boards. 
Many thanks for your help. I know what to keep an eye on now, and have my reboot set. 

João Cardoso

unread,
Sep 18, 2014, 10:06:12 AM9/18/14
to al...@googlegroups.com


On Thursday, September 18, 2014 1:36:12 AM UTC+1, James Pike wrote:
Good to know. Been running Alt-F since RC3, and love it. This was the first time I had a question that wasn't already answered in either the FAQ or here on the boards. 
Many thanks for your help. I know what to keep an eye on now,

Another hypothesis is that some process is creating huge log files.
You can watch log files sizes using the 'ls -lhR /var/log/' command every couple of hours and noticing if any one is steadily growing.
There is a service that truncates the log files to a maximum size, use Services->System->Cleanup.

Of course, rebooting every day or using the Cleanup service will probably mask both the processes and log files possible issues...
 

James Pike

unread,
Sep 18, 2014, 1:26:05 PM9/18/14
to al...@googlegroups.com
So having the NAS reboot at 5am every day, and having the Cleanup checked to start at boot, should keep it running smooth then.

What was happening was, every few days of it running, the Load would be maxed out, and navigating the WebUI and Samba folders through Windows, would take extremely long load times. Once that starts, it continues to get worse until I'm unable to access either anymore. That's when I have to manually reboot the NAS. On a fresh reboot, everything runs fast and smoothly.

Again, many thanks for the help. Alt-F is hands down, the best firmware for this device out. 

--
You received this message because you are subscribed to a topic in the Google Groups "Alt-F" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/alt-f/CC4CEINlar4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to alt-f+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/alt-f.
For more options, visit https://groups.google.com/d/optout.

João Cardoso

unread,
Sep 19, 2014, 10:25:22 AM9/19/14
to al...@googlegroups.com


On Thursday, September 18, 2014 6:26:05 PM UTC+1, James Pike wrote:
So having the NAS reboot at 5am every day, and having the Cleanup checked to start at boot, should keep it running smooth then.

Hope so.

But applying cures without having the correct diagnostic first is not how Dr. House used to work (or is it?)

To find the culprit you should keep the box running and once or twice a day perform the indicated (or other) diagnostics. Hopefully you would detect the culprit before the box becomes too sluggish. But it is not guaranteed that you will find it.

James Pike

unread,
Oct 22, 2014, 3:19:55 PM10/22/14
to al...@googlegroups.com
Ok, so the problem hasn't gone away. I removed the auto-reboot cron, just so I could watch it and see what happens. It seems to be all stemming from Transmision. If I stop the service, the NAS runs just fine. Once I start the service up again, it bogs down. Here is the top of the running services report.

Mem: 52100K used, 8596K free, 0K shrd, 4504K buff, 6960K cached
CPU:   2% usr  97% sys   0% nic   0% idle   0% io   0% irq   0% sirq
Load average: 8.20 5.98 5.97 5/61 814
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
 3877  3876 transmis R    64620 106%  38% transmission-daemon --logfile /var/log/transmission/transmission.log --pid-file /var/run/transmission/transmission.pid --config-dir=/var/lib/transmission
 3148  3117 lighttpd R    20368  33%  28% /usr/bin/php-cgi
  814   798 root     R     1224   2%  13% top -bn1
   60     2 root     SW<      0   0%  10% [loop0]
 2691     2 root     SW       0   0%   5% [kworker/0:3]
   62     2 root     SW<      0   0%   3% [kworker/0:1H]
    3     2 root     RW       0   0%   3% [ksoftirqd/0]
 4026  3876 transmis R    64620 106%   0% transmission-daemon --logfile /var/log/transmission/transmission.log --pid-file /var/run/transmission/transmission.pid --config-dir=/var/lib/transmission
 3873     1 transmis S    64620 106%   0% transmission-daemon --logfile /var/log/transmission/transmission.log --pid-file /var/run/transmission/transmission.pid --config-dir=/var/lib/transmission
 3876  3873 transmis S    64620 106%   0% transmission-daemon --logfile /var/log/transmission/transmission.log --pid-file /var/run/transmission/transmission.pid --config-dir=/var/lib/transmission
 3152  3122 lighttpd S    19280  32%   0% /usr/bin/php-cgi
 3154  3124 lighttpd S    18544  30%   0% /usr/bin/php-cgi
 3149  3120 lighttpd S    17684  29%   0% /usr/bin/php-cgi
 3124  3114 lighttpd S    17372  28%   0% /usr/bin/php-cgi
 3117  3114 lighttpd S    17372  28%   0% /usr/bin/php-cgi
 3122  3114 lighttpd S    17372  28%   0% /usr/bin/php-cgi
 3120  3114 lighttpd S    17372  28%   0% /usr/bin/php-cgi
 1989   852 root     S    13004  21%   0% smbd -D
 1175   852 root     S    12808  21%   0% smbd -D
  852     1 root     S    10444  17%   0% smbd -D
  901   852 root     S    10444  17%   0% smbd -D
  767     1 root     S     7936  13%   0% nmbd -D
 3114     1 lighttpd S     7120  12%   0% lighttpd -f /etc/lighttpd/lighttpd.conf
  798   797 root     S     1284   2%   0% {sys_utils_proc.} /bin/sh sys_utils_proc.cgi

Transmission is running 4 times, and each is using 106% of the CPU?? No wonder I can't do anything, and have to constantly reboot it. Is there a way to limit what transmision uses?

João Cardoso

unread,
Oct 23, 2014, 7:23:23 PM10/23/14
to al...@googlegroups.com
That's normal, these are children from the main process, you can follow the parent/child chain following the PID/PPID (Process ID and Parent Process ID)

 and each is using 106% of the CPU?

No, VSZ is the Virtual memory size, how much memory is being consumed. Depending on the implementation these child process will certainly be sharing data, so all them together are using 106% of memory. That means that swapping between the memory and the disk swap partition is occurring -- in the Status Page you will notice how much swap is being used in the Swap bar graph. Swapping makes a system much slower.

You missed the log file details. Is Transmission actively logging? what is the log file size? and contents? it's /var/log/transmission/transmission.log

Have you updated Transmission to the last (Alt-F) version?
 
 No wonder I can't do anything, and have to constantly reboot it. Is there a way to limit what transmision uses?

Yes, download less torrents (one torrent at a time?), keep sharing for a smaller amount of time... the box is a *small* computer, with only 64MB of memory, not 4GB as your PC, and has 20 to 50 less processing power than you PC.

In any case, that's not an Alt-F issue.

Jefrey Goldon

unread,
Oct 3, 2014, 8:00:03 AM10/3/14
to al...@googlegroups.com
Quick question on similar issue:

I want to shut down the box with cron.
Do i need a specific switch for /sbin/shutdown (like "-h now", as i read it here http://www.cyberciti.biz/tips/howto-shutdown-linux-box-automatically.html ) or is it enough to just use the this command?

* - 02:00  - /sbin/shutdown

Kenneth Kwan

unread,
Dec 16, 2019, 1:56:47 PM12/16/19
to Alt-F
Hi,

I was trying to setup a cron job to reboot the box but it didn't work.

screen.jpg

However, if I replaced the command to /usr/sbin/poweroff...it does power off the box.  So the cron job is working, just not the command /usr/sbin/reboot.  Any idea?  Thanks.

Joao Cardoso

unread,
Dec 16, 2019, 7:11:50 PM12/16/19
to Alt-F
[root@DNS-320L]# which reboot
/sbin/reboot

 
Reply all
Reply to author
Forward
0 new messages