Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > sh command slowing computer down to a slow mode.

sh command slowing computer down to a slow mode.
Thread Tools
nobitacu
Mac Elite
Join Date: Mar 2003
Location: United States
Status: Offline
Reply With Quote
Mar 22, 2005, 11:23 PM
 
Ok,

This is the second time it's happened to me. After a normal restart, the command sh -c ps axww -Sro %cpu, %mem, command | grep ' comes on itself, and stays on. using 30 to 40+ % of my CPUs and made my system so slow I thought my dual G5 has become a G3 and went back in time. What the hell is going on???? Why does this command come on by itself sometimes after rebooting? It's pissing me off! Look below if you want to see what computer I'm running, or suppose to be running.

Thanks,

Ming
A Proud Mac User Since: 03/24/03
Apple Computer: MacBook 2.0GHz Intel Core 2 Duo, 3 GB Memory, 120 GB HD
     
Ganesha
Senior User
Join Date: Jul 2002
Location: Arizona Wasteland
Status: Offline
Reply With Quote
Mar 22, 2005, 11:42 PM
 
Originally posted by nobitacu:
Ok,

This is the second time it's happened to me. After a normal restart, the command sh -c ps axww -Sro %cpu, %mem, command | grep ' comes on itself, and stays on. using 30 to 40+ % of my CPUs and made my system so slow I thought my dual G5 has become a G3 and went back in time. What the hell is going on???? Why does this command come on by itself sometimes after rebooting? It's pissing me off! Look below if you want to see what computer I'm running, or suppose to be running.

Thanks,

Ming
This is very odd, are you reporting the full output? Here is what that command seems to do

sh -c (excute what follows in a shell)
ps axww -Sro %cpu, %mem, command (retrieve information about what processes are running)
| (pipe (i.e. send) the output of the previous command to the next command)
grep (this is the start of a search, it seems like an incomplete command)

The grep command seems incomplete, as there is no string to search for. Even if there was your g5 should complete the ps command and be able to search its output in milliseconds.

Edit: Try typing 'ps -ax' in a terminal window the next time this happens. And expand the window so you can see the entire command.
     
nobitacu  (op)
Mac Elite
Join Date: Mar 2003
Location: United States
Status: Offline
Reply With Quote
Mar 22, 2005, 11:48 PM
 
Thanks, I'll try to do that next time.

Yea, I have no clue what that is, but it happens sometimes after a reboot, and it never stops doing that. Even though it's using around 40% of my CPUs power, the speed of my computer makes it seems like it's using all 100% of it. It gets so slow that it takes around 15 seconds or so for any app to open after you click on it. Everytime it happens, I just reboot and it'll be gone.

Ming
A Proud Mac User Since: 03/24/03
Apple Computer: MacBook 2.0GHz Intel Core 2 Duo, 3 GB Memory, 120 GB HD
     
Brass
Professional Poster
Join Date: Nov 2000
Location: Tasmania, Australia
Status: Offline
Reply With Quote
Mar 23, 2005, 12:23 AM
 
This is exactly the kind of command that many admins use all the time. "ps" to list processes, piped to "grep" to show only processes that match a particular expression. The "sh" part just means that the command is being run in a shell.

Some application/utility/extension/script or whatever is running this command to search for some other process. Unfortunately your view of the command appears to be truncated, missing whatever comes after the "grep", which would provide exact details on what is being searched for in the process list.

Using process viewer utility might help?

Or you could (using "ps -ax") find tha process' parent process ID (PID) and find out what that process is.

Don't know if this helps point you in the right direction at all.
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Mar 23, 2005, 12:30 AM
 
Are you on a Network? Do other people have access to your Mac? Also, do you mean that the Terminal application opens, or is this during the boot process? If it's in a Terminal window, take a look at your StartUpItems in your account in the prefs. List the apps there, if any?
weird wabbit
     
nobitacu  (op)
Mac Elite
Join Date: Mar 2003
Location: United States
Status: Offline
Reply With Quote
Mar 23, 2005, 12:37 AM
 
Originally posted by theolein:
Are you on a Network? Do other people have access to your Mac? Also, do you mean that the Terminal application opens, or is this during the boot process? If it's in a Terminal window, take a look at your StartUpItems in your account in the prefs. List the apps there, if any?
No, this was done in my background, the terminal window does not come up. I know about it because I run Konfabulator CPU Usage which tells me how much cpu each app or program I have is using. And it shows up in there which uses my system cpu around 40%, and that causes my system to become so slow it's almost unworkable. I'm not on a network, I do have a wireless network on, but it isn't a open network, it's closed with password. I don't use it though, I only use it with my PS2 or Xbox if I need to go online to play games in my living room. So other people shouldn't have any access to my Mac, at least I hope not. This happens during the boot process after I restarted my computer.
As for my startup items, I do have a few in there. Konfabulator, X Resource Graph, Microsoft AU Daemon, iTunesHelper, Palm Desktop Backgroud, Transport Monitor, Microsoft Database Daemon, and LCCDaemon.

Ming
A Proud Mac User Since: 03/24/03
Apple Computer: MacBook 2.0GHz Intel Core 2 Duo, 3 GB Memory, 120 GB HD
     
theolein
Addicted to MacNN
Join Date: Feb 2001
Location: zurich, switzerland
Status: Offline
Reply With Quote
Mar 23, 2005, 12:44 AM
 
Originally posted by nobitacu:
No, this was done in my background, the terminal window does not come up. I know about it because I run Konfabulator CPU Usage which tells me how much cpu each app or program I have is using. And it shows up in there which uses my system cpu around 40%, and that causes my system to become so slow it's almost unworkable. I'm not on a network, I do have a wireless network on, but it isn't a open network, it's closed with password. I don't use it though, I only use it with my PS2 or Xbox if I need to go online to play games in my living room. So other people shouldn't have any access to my Mac, at least I hope not. This happens during the boot process after I restarted my computer.
As for my startup items, I do have a few in there. Konfabulator, X Resource Graph, Microsoft AU Daemon, iTunesHelper, Palm Desktop Backgroud, Transport Monitor, Microsoft Database Daemon, and LCCDaemon.

Ming
There's nothing out of the ordinary there. Could you open the Terminal the next time this happens (perhaps do a few restarts in a row to get it to do it) and enter the following command and post the results here?:

ps-aux
weird wabbit
     
Angus_D
Addicted to MacNN
Join Date: Mar 2000
Location: London, UK
Status: Offline
Reply With Quote
Mar 23, 2005, 08:31 AM
 
ps -auwwx
is probably more helpful
     
Dog Like Nature
Dedicated MacNNer
Join Date: May 2004
Status: Offline
Reply With Quote
Mar 23, 2005, 11:40 AM
 
Originally posted by nobitacu:
I know about it because I run Konfabulator CPU Usage

As for my startup items, I do have a few in there. Konfabulator,
We have our culprit. I'm guessing the CPU widget is the source of your problem.
╭1.5GHz G4 15" PB, 2.0GB RAM, 128MB VRAM, 100GB 7200rpm HD, AEBS, BT kbd
╰2.0GHz T2500 20" iMac, 1.5GB RAM, 128MB VRAM, 250GB 7200rpm HD

http://www.DogLikeNature.com/
     
CaptainHaddock
Grizzled Veteran
Join Date: Apr 2004
Location: Nagoya, Japan • 日本 名古屋市
Status: Offline
Reply With Quote
Mar 24, 2005, 12:03 AM
 
I've noticed that sometimes when my Linux friend SSHes into my Mac to upload a file, my CPU usage goes up to about 30% for the duration of the SSH session.
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Mar 24, 2005, 10:44 AM
 
Originally posted by Dog Like Nature:
We have our culprit. I'm guessing the CPU widget is the source of your problem.
I'm going to second this one, this sounds exactly like what a widget writer would use to get that job done, and it would start itself. It could be that this widget is damaged... but personally I would just lose it in any case.
     
   
Thread Tools
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 01:47 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,