Kill processes at startup

Using applications, configuring, problems
Post Reply
Message
Author
Dani17
Posts: 10
Joined: Sat 29 Jan 2011, 19:54

Kill processes at startup

#1 Post by Dani17 »

Hi.

I use puppy in an old notebook for download with amule and torrent.

But I would to reduce the use of ram and cpu.

can i kill some processes that I don't use?

thanks

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#2 Post by Dougal »

There isn't much to kill, but you could probably go to /etc/init.d and make the scripts there non-executable (right-click and go to File->Permissions). (There might be an option in the Boot Manager for this?)

You should also search the forum as someone had a thread about this in the past.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#3 Post by `f00 »

As Dougal started with (yep) some things you can 'de-executize' and they also may be a (preferred) option from the bootmanager in some pups. Other places to look:

b) /root/Startup dir - 'de-executize' unwanted scripts if they have no way to toggle them off otherwise

c) /root/.xinitrc - some lines can be commented out but do be careful doing that editing

d) the audio mixer startup is usually in delayed_run (don't recall the exact path but a search should find) - it's not much saving anyhow if you do use it occasionally.

e) If you don't use rox's drag'n'drop desktop or the driveicons you can save a bit there (comment out pertinent lines regarding PuppyPin in c) and untick stuff in eventmanager)

f) check out some optimized pups like Jemimahs stuff for portable comps (lappies, eees etc) or other skinny-running dogs (like zenfunk's PULP or similar)

.. as for what you can safely trim down to, that varies but a lot of stuff that's started up and running can be disabled and made on-demand. Use a utility like htop or pprocess to see what's needed and not-so-much. Also watch out for unusual side effects as some things are integrated with others.

GL

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

menu->system->BootManager configure bootup
There is a manage system services.
Gives you a selection of stuff that can be turned off.

Bruce B

#5 Post by Bruce B »

Request the application to close before killing it. I wrote a script for you. Use it like this:

killsoft ROX-Filer firefox firefox-bin geany and etc

killsoft

Code: Select all

#!/bin/bash

# sleep time here if you want delay

for ((cnt=0;cnt<3;cnt++)) ;do
	for i in $@ ; do
		 kill -s 15 `pidof $i` 2>/dev/null
	done
done

for ((cnt=0;cnt<2;cnt++)) ;do
	for i in $@ ; do
		 kill -s 9 `pidof $i` 2>/dev/null
	done
done

# sleep 1 # optional feature before forcing the
# application down, in case the request is taking
# a little time - use time 1,2,3 - whatever


# verify success here
for i in $@ ; do
	ps | grep $i | grep -v grep | grep -v $0
done
Script attached

Also, you can exec it from another script which contains the
predetermined parameters.

Code: Select all

exec killsoft app xapp yapp
~
Attachments
killsoft.zip
(419 Bytes) Downloaded 167 times

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#6 Post by sc0ttman »

As bigpup said, you can choose what loads at startup through the boot manager thing in Menu->System.

I also attached my own startup control thing... It does not require a save file to be in use.

With this tool, you can control what gets started from /etc/init.d and /root/Startup

You might also want to look in /root/.xinitrc to see what is being loaded there - although there is not much in there that you can 'do without'...

screenshot of the 'Startups' tool here
Attachments
startups.gz
a simple tool to manage startup processes
(10 KiB) Downloaded 185 times
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#7 Post by big_bass »

Hey sc0ttman

thats nice it even auto detects what you have running :D
thank you
-------------------------------------------------------------------
here is what I was using just a simple kill by name
which is still useful for apps that get hung up /frozen

here is a firefox example simple but works well

Code: Select all

pid=`ps aux | grep firefox | awk '{print $2}'`&&kill -9 $pid
here is killbyname for multiple apps note: dont put a shebang #!/bin/bash

Code: Select all

# killbyname 
# place in /usr/bin
# CLI tool to kill by name or names 
# Joe Arose ..big_bass

# example below 
# killbyname firefox leafpad 

for process in "$@"
do  pid=$(ps aux | grep "$process" | awk '{print $2}')&& kill -9 $pid
done




thanks again
Joe

Dani17
Posts: 10
Joined: Sat 29 Jan 2011, 19:54

#8 Post by Dani17 »

thanks a lot.

I don't understand at all these solutions.

I saw the boot manager config bootup.
can I deselect all these options?



the following suggestions I have not understood

Post Reply