(OLD) (ARCHIVED) Puppy Linux Discussion Forum Forum Index (OLD) (ARCHIVED) Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info

This forum can also be accessed as http://oldforum.puppylinux.com
It is now read-only and serves only as archives.

Please register over the NEW forum
https://forum.puppylinux.com
and continue your work there. Thank you.

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 22 Sep 2020, 00:11
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Kill processes at startup
Moderators: Flash, Ian, JohnMurga
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
Dani17

Joined: 29 Jan 2011
Posts: 10

PostPosted: Sat 26 Mar 2011, 12:52    Post subject:  Kill processes at startup  

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
Back to top
View user's profile Send private message 
Dougal


Joined: 19 Oct 2005
Posts: 2504
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sat 26 Mar 2011, 15:58    Post subject:  

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
Back to top
View user's profile Send private message 
`f00


Joined: 06 Nov 2008
Posts: 808
Location: the Western Reserve

PostPosted: Sat 26 Mar 2011, 21:18    Post subject:
Subject description: this topic is here now anyway, so..
 

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
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 13981
Location: S.C. USA

PostPosted: Sat 26 Mar 2011, 23:00    Post subject:  

menu->system->BootManager configure bootup
There is a manage system services.
Gives you a selection of stuff that can be turned off.
Back to top
View user's profile Send private message 
Bruce B

Joined: 18 May 2005
Posts: 11488
Location: The Peoples Republic of California

PostPosted: Sun 27 Mar 2011, 02:14    Post subject:  

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:
#!/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:
exec killsoft app xapp yapp


~
killsoft.zip
Description 
zip

 Download 
Filename  killsoft.zip 
Filesize  419 Bytes 
Downloaded  165 Time(s) 

_________________
New! Puppy Linux Links Page
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2806
Location: UK

PostPosted: Sun 27 Mar 2011, 06:32    Post subject:  

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
startups.gz
Description  a simple tool to manage startup processes
gz

 Download 
Filename  startups.gz 
Filesize  10 KB 
Downloaded  181 Time(s) 

_________________
Pkg, mdsh, Woofy, Akita, VLC-GTK, Search
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1742

PostPosted: Mon 28 Mar 2011, 12:19    Post subject:  

Hey sc0ttman

thats nice it even auto detects what you have running Very Happy
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:
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:

# 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
Back to top
View user's profile Send private message 
Dani17

Joined: 29 Jan 2011
Posts: 10

PostPosted: Thu 31 Mar 2011, 10:51    Post subject:  

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
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies. View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0803s ][ Queries: 12 (0.0364s) ][ GZIP on ]