aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: How do you stop Amuled?  (Read 6108 times)

hopelessone

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 107
  • Ubuntu 8.04
How do you stop Amuled?
« on: March 19, 2008, 03:00:14 PM »

Hi,,

must be blind but i can't see a way to stop amuled?

where is the command?

thanks
Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: How do you stop Amuled?
« Reply #1 on: March 19, 2008, 04:01:32 PM »

Use the Shutdown command of amulecmd.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: How do you stop Amuled?
« Reply #2 on: March 19, 2008, 10:33:18 PM »

kill it.

no, seriously, we have a SIGHUP.
Logged

hopelessone

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 107
  • Ubuntu 8.04
Re: How do you stop Amuled?
« Reply #3 on: March 26, 2008, 01:55:54 AM »

firebox@firebox-desktop:~$ killall amuled
amuled: no process killed
firebox@firebox-desktop:~$ amuled
amuled: OnInit - starting timer
Initialising aMule
Checking if there is an instance already running...
There is an instance of aMule already running
Raising current running instance.
firebox@firebox-desktop:~$ killall amule
amule: no process killed
firebox@firebox-desktop:~$ killall amulecmd
amulecmd: no process killed
firebox@firebox-desktop:~$ amuled
amuled: OnInit - starting timer
Initialising aMule
Checking if there is an instance already running...
There is an instance of aMule already running
Raising current running instance.
firebox@firebox-desktop:~$


currently i have to reboot to start it again ?????
Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: How do you stop Amuled?
« Reply #4 on: March 26, 2008, 05:32:11 AM »

You can find the PID by doing:

Code: [Select]
ps -A | grep amule
and then to stop it use:

Code: [Select]
kill -9 $PID_of_amuled
and you will be happy.

Regards.
Logged

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: How do you stop Amuled?
« Reply #5 on: March 26, 2008, 12:53:47 PM »

-9 is a SIGKILL. Use a SIGHUP, which is the default.
Logged

hopelessone

  • Full Member
  • ***
  • Karma: 1
  • Offline Offline
  • Posts: 107
  • Ubuntu 8.04
Re: How do you stop Amuled?
« Reply #6 on: March 26, 2008, 02:50:31 PM »

Tan-Q very much !!!!
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: How do you stop Amuled?
« Reply #7 on: March 26, 2008, 10:52:19 PM »

-9 is a SIGKILL. Use a SIGHUP, which is the default.

JFYI, SIGTERM is the default.
Logged
concordia cum veritate

Kry

  • Ex-developer
  • Retired admin
  • Hero Member
  • *****
  • Karma: -665
  • Offline Offline
  • Posts: 5795
Re: How do you stop Amuled?
« Reply #8 on: March 26, 2008, 11:25:17 PM »

Woops. I meant SIGTERM
Logged

RRT4

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 67
Re: How do you stop Amuled?
« Reply #9 on: April 06, 2008, 10:43:02 PM »

i have a problem, currently 5-6 times of 10 when i reboot the system running amuled known.met (or known2_64.met) result corrupted (something in amule log as 'missing headers etc', i do not remember well the error reported because it does not appear always in the log), so the system needs to rehash all files (more than 500 files on a 500Mhz downclocked athlon, it took 5/6 hours)

could the problem be based on the fact that sometimes amuled is not responding to signal SIGTERM (also other conf files are not saved but they do not result corrupted) ?

archlinux rc.shutdown script send in order these commands:

-/etc/rc.local.shutdown (local shutdown scripts)
-shutdown daemons (amuled start|stop|restart script) -> killall -15 --ignore-case $DAEMON
-terminate all processes -> /sbin/killall5 -15 &> /dev/null
-sending SIGKILL To Processes -> /sbin/killall5 -9 &> /dev/null




 
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: How do you stop Amuled?
« Reply #10 on: April 06, 2008, 11:59:20 PM »

Or it could be that it takes too long for amuled to shut down, and is killed before the shutdown finishes.
Logged
concordia cum veritate

RRT4

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 67
Re: How do you stop Amuled?
« Reply #11 on: April 07, 2008, 02:43:54 AM »

i tried putting
su amuled_user -c 'amulecmd -c shutdown' in /etc/rc.local/shutdown
but the problem persists

2008-04-07 01:31:16: KnownFileList.cpp(86): Warning: Knownfile list corrupted, contains invalid header.
...
2008-04-07 01:31:58: SharedFileList.cpp(358): Found 0 known shared file, 490 unknown

at this point really could be that amuled takes too long to shutdown properly (the cpu is slow and the known.met is not saved in time)
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: How do you stop Amuled?
« Reply #12 on: April 07, 2008, 03:44:01 AM »

You may introduce some extra waiting time between the '/sbin/killall5 -15' and the '/sbin/killall5 -9' commands, such as 'sleep 10'.

The clean way would be to create a start/stop script, and let it wait for amuled shutdown on stop command.
Logged
concordia cum veritate

RRT4

  • Jr. Member
  • **
  • Karma: 3
  • Offline Offline
  • Posts: 67
Re: How do you stop Amuled?
« Reply #13 on: April 08, 2008, 10:34:19 PM »

Not yet certain to 100% (still too few reboots), but the problem appears to be solved with 'sleep 15' (probably it works with 'sleep 10' too, i need to test, original was 'sleep 5')

tnx




Logged