NAS540, How to stop processes?
MarkusDesk
Posts: 31 Freshman Member
Hello,
I think this question will be for Mijzelf.
I have a NAS540 and I am trying to use to stream my content using SMB and it is really bad(Twonky and Cloud services disabled), so I installed the Meta Repository and Tweaks and disabled every script on Tweaks minus the one for samba and now I can see that it almost can keep up, but the video stream still get some random pauses.
Using Htop, I can see exactly when the stream pauses happens is when these processes spikes the CPU usage:
* python /usr/local/apache/we_framework/main_wsgi.pyc * /usr/sbin/httpd -f /etc/service_conf/httpd.conf
As I can see these are responsible for the web server. What I am trying to do is to stop them and when I need to access the web config of the NAS, I could start them again.
I tried to stop them, but they start again. So how can I stop them and start when needed?
Thanks
0
Accepted Solution
-
As far as I know it's the backend of the webinterface. The CGI of the webinterface communicates with it through pipes and files.
0
All Replies
-
I *think* the services are automatically restarted by app_wd. But I also think you are on the wrong track. The box should be able to provide 75+MB/sec, while a media stream won't exceed 10MB, and then you have a very large stream.Only if samba is consuming near to 100% of the CPU cycles, it makes sense to try kill some other services.If your stream is stuttering, it's almost for sure a network problem. Next would be a disk problem. Have a look with dmesg, to see if there are hardware problems. When the disk is almost full, it could also be file fragmentation.0
-
Hi Mijzelf! Thanks for replying. Network is fine and no problem shown with dmesg. But samba does peaks about 70% to 80% CPU usage, but than the processes listed below peaks too and boom, we have stutter:* python /usr/local/apache/we_framework/main_wsgi.pyc
* /usr/sbin/httpd -f /etc/service_conf/httpd.confI read the app_wd link but I could not figure out how could I create a script to start and stop above processes and how to start the system with them disabled and how to enable them when needed. I am not too good with Linux... I think it would be similar to the way you made in the Tweaks app to start without some processes. Could you please give me an example? Again, thanks.
0 -
The way Tweaks disables services is different for each service. Sometimes you can simply empty the start script, sometimes you need to start a fake service because app_wd monitors the running processes and restarts a process when it's lacking. If you simply disable such a process, you end up with a system spending a lot of time starting nothing.In your case you could first try to find out what is accessing the webserver, and disable that. The webserver does nothing on it's own. Do you have a port forward to the webserver and are you collecting internet noise?When the webserver is not accessed, I don't think the python script will do anything.If you can't stop the webserver access, you'll have to exchange it by a fake process. One way is to mount a script on the binary. Create a script which basically does nothing:#!/bin/shwhile [ true ]dosleep 1000doneMake it executable:chmod a+x /path/to/scripttest it, and mount it on /usr/sbin/httpd:mount -o bind /path/to/script /usr/sbin/httpdNow you can restart the webserver:/etc/init.d/httpd.sh restartIn htop you should see sleep as a child of httpd.To enable the webserver again, stop the fake script:killall httpdunmount the binaryumount /usr/sbin/httpdand start the webserver/etc/init.d/httpd.sh start(Or wait until app_wd does it for you)0
-
Hi, thanks again for relying. When I get home will test it. Regarding the process:* python /usr/local/apache/we_framework/main_wsgi.pycIs it part of the httpd? If not, how should I stop it?
0 -
As far as I know it's the backend of the webinterface. The CGI of the webinterface communicates with it through pipes and files.
0 -
Hi Mijzelf, thank you very much for you attention and all information. I am not in my hometown these days, but as soon as I get home I will test everything!!
0 -
Hello, sorry for the delay, but I made a lot of tests. Now I am able to stream SMB without stuttering. Here is what I made:1- Installed Mijzelf Tweaks and disabled everything, except Samba.2- Enabled flow control in my managed switch on the NAS540 port and on my player's port.3- Used the LAN 2 connector of the NAS540. Tested on 2 different units.I know it sounds weird, but it works perfectly. I also have a second NAS540 and these settings also work on it! If any of the steps above are not followed, it will have some stuttering.And as always, than kyou Mijzelf for all information!0
Categories
- All Categories
- 415 Beta Program
- 2.4K Nebula
- 144 Nebula Ideas
- 94 Nebula Status and Incidents
- 5.6K Security
- 238 USG FLEX H Series
- 267 Security Ideas
- 1.4K Switch
- 71 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.3K Consumer Product
- 247 Service & License
- 384 News and Release
- 83 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.2K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 83 About Community
- 71 Security Highlight