[Guide] Useful terminal commands for troubleshooting/system status.

Hi everyone.  I'm looking for a concise list of useful commands to run incase something should happen to be going wrong somewhere (and also a 1-line for what they do)...the kind of output you'd post in a bug report.  Some other good commands would help make "whats going on under the hood" more clear.
Also, if you have some useful directories (like /var/log), I'll take them too.
Current List (Thanks to all the posts below):
iwconfig, ifconfig | currently running wireless and overall link/state status.
dmesg | down/n/dirty low level system activity log
htop (non-built-in) | Process monitor
iftop, nethogs (non-built-in) | Bandwidth usage monitor
lsmod | Currently loaded modules
pstree | Currently running processes in a tree-text format
df -h | Hard drive space usage
ps -A -ao rss,comm | sort -rn | sed -n '1,5{s/^/\t/;s/ /\t/p}' | Top 5 ram hogs and how much
xsel -o -p |  Clipboard monitoring (non-built-in)
xsel -o -b |
/var/log - looking for a log from a system process...probably here.
~/.XXXX - User installed programs house their config files here... ~/ = Your username's home directory.  Equivalent to Application Data on Windows.
Last edited by dr/owned (2009-03-21 15:57:21)

ltrace -- strace-like, but shows library calls, not only system ones.
vmstat -- shows many essential system parameters at a glance, first tool to start investigating bottlenecks
lsof -- "list open files"; as network sockets, pipes, ... are all "files", there are many interesting informations to gather. But I use it for two purposes mainly: to identify file descriptors in strace/ltrace output and for finding deleted, but still open files eating disk space.
I like atop also, for its ability to show aggregated data, grouped by user or process name.

Similar Messages

  • FM for changing system status in Service Notification

    Hi all,
    I have a tough situation here.
    To change the system status in service notification, the system use "IQS4_CHANGE_STAT_NOTIFICATION".
    CALL FUNCTION 'IQS4_CHANGE_STAT_NOTIFICATION'
      EXPORTING
        i_qmnum                  =
        i_vrgng                  =
        I_CHECK_ONLY             = ' '
        I_SPRAS                  = SY-LANGU
        I_BEZDT                  = SY-DATUM
        I_BEZUR                  = SY-UZEIT
        I_POST                   = 'X'
        I_COMMIT                 = ' '
        I_WAIT                   = ' '
        I_REFRESH_COMPLETE       = 'X'
      IMPORTING
        E_VIQMEL                 =
        E_STTXT                  =
        E_ASTXT                  =
      TABLES
        RETURN                   =
    2 main fields are required; i_qmnum and i_vrgng.
    I am able to provide i_qmnum (as this is the service notification number that i need to change).
    However, i_vrgng is a field in table (TC33-VRGNG). The values in the table does not make sense to me.
    Example. To change the status to NOPR (Put in progress), the FM uses PPM2 or PPM6 for i_vrgng. If we take a look at the table TC33, it doesn't indicate in anyway how NOPR is related to PMM2 or PMM6.
    Is there a guideline (ie, to change status to OSTS, i use a certain value in TC33-VRGNG to run the FM)?
    Please see BAPI_SERVNOT_POSTPONE & BAPI_SERVNOT_PUTINPROGRESS for a clearer picture of what I'm saying.
    Thanks,
    Earl

    Please try using FM STATUS_CHANGE_INTERN for changing System Status as i was not able to find any link between status and the field provided in FM in ur post.
    This FM directly changes system status of any object.But this FM requires System Status Value not Text.
    NOPR, NOCO etc are system texts.The main table for system status  is TJ02T which will give u the status value for the status text.
    For eg NOPR status text will have status value as 'I0070'.
    Reward Points if useful
    Edited by: Pratyasha Shishodia on Mar 14, 2008 11:07 AM

  • Terminal command, when in system install disc

    I was wondering if anyone could clue me in to a terminal command for when I am booting off the System disc, and need to get to the root on my HardDrive, or home folder

    OK, if the drive isn't mounted then mount it with /sbin/mount -uaw or use Disk Utility in the menu to mount it, then look for /Volumes in Terminal.
    Sorry, can't reboot off the Install disk to garner the exact commands, but it sounds like you may just need an inkling anyway!

  • Filevault encryption paused, despite reset of PRAM and using terminal commands

    I have been trying to partition my HDD but am unable to because file vault encryption is paused - and has been since October 2014.
    I attempted making a new user to see if this would bypass it, but it didn't.
    I have reset the PRAM and have repaired the HDD both in recovery and normal, neither work.
    I have also used terminal command "sudo fdesetup disable" to attempt turning it off, but that doesn't work either.
    Help please??
    Harry

    If you don't already have a current backup of all data, back up before proceeding. There are ways to back up a computer that isn't fully functional. Ask if you need guidance.
    Start up in Recovery mode. When the OS X Utilities screen appears, select Disk Utility.
    In the Disk Utility window, select the icon of the startup volume from the list on the left. It will be nested below another disk icon, usually with the same name. Click the Unlock button in the toolbar. When prompted, enter the login password of a user authorized to unlock the volume, or the alternate decryption key that was generated when you activated FileVault.
    Then, from the menu bar, select
              File ▹ Turn Off Encryption
    Enter the password again.
    You can then restart as usual, if the system is working. Decryption will be completed in the background. It may take several hours, and during that time performance will be reduced.
    If you can't turn off encryption in Disk Utility because the menu item is grayed out, you'll have to erase the volume and then restore the data from a backup. Select the Erase tab, and then select
              Mac OS Extended (Journaled)
    from the Format menu.
    You can then quit to be returned to the main Recovery screen. Follow these instructions if you back up with Time Machine. If you use other backup software, follow its developer's instructions.
    Don't erase the volume unless you have at least two complete, independent backups. One is not enough to be safe.

  • Hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,but i can't find  my data which i have saved on mac.please help me out in this matter.

    hey,i forgot my login password,so i changed the password by using terminal command(reset password).now i have new user name with new password,
    but i can't find  my data which i have saved on mac.the storage is showing data used and free space on the disk
    please help me out in this matter.

    How did you change your user name?
    resetpassword wouldn't have done it. If you managed to create a new user, then your data is still in the old account.

  • Terminal command for setting software update to defaults

    terminal command for setting software update to defaults?

    didn't even think of that...seems to be the most obvious things, seem to be the first to be overlooked.
    Will let you know.

  • System asking me to fill MANDATORY fields, even I used EXIT-COMMAND for F3

    HI Experts,
    issue- there is mandatory field in the screen, so, am using the folllowing code, system asking me to fillup the mandatory field.
    then, i used exit-command, but, still its asking me to fill the mandatory fiels???????????
    code is,
    process after input.
    ***Exit command
    module cancel at exit-command.
    module cancel.
    module user_command_9001.
    module cancel input.
    case: ok_code.
    when wa_con_back.
    clear ok_code.
    set screen 0.
    leave screen.
    when wa_con_exit.
    clear ok_code.
    set screen 0.
    leave screen.
    endcase.
    endmodule. " cancel INPUT
    thanq

    I am not sure but try making a specific module for your exit handling, for instance:
    module do_exit at exit-command.
    module cancel
    module user_command_9001.
    Hope it helps you,
    Bert

  • Services to be checked after system restart for getting system status

    Hi,
    We are trying to identify all the services that are to be checked before we confirm that a system is available.
    While performing a system status check on J2EE instances after restart of the system , after getting a respone on TELNET to the HTTP Port sometimes the system was found to be not completely up.
    We have observed that though the server processes are down HTTP service responds to user requests.
    Could you please help identify the other services which must also be checked to be completely sure that the system is UP ?
    We have gone through the document "TCP/IP Ports Used by SAP Applications" in SDN.
    But It doesn't talk about the ports to check for Java server processes.
    For ABAP we do a telnet on Message server and so far we got it right.
    Should we check on other services as well in ABAP stack systems to confirm on their availability?
    Thanks
    Prateek
    Edited by: Prateek Gupta on Dec 5, 2011 8:32 AM
    Edited by: Prateek Gupta on Dec 5, 2011 8:48 AM

    Hi Prateek,
    Please use below command to check if JAVA Stack/Instance is UP and Running or not.
    jcmon pf=/usr/sap/<SID>/SYS/profile/instace profile name (If your Server O.S. is Solaris or Unix)
    Then goto option 20 and you can find there Dispatcher, Server0 and SDM are UP and Running or not.
    If everything is Up and Running, then you can goto your browser and paste there:
    http://Hostname:5<XX>00
    where <XX> is the System Number where your Java enginee/Stack is present.
    In order to check  ABAP Enginee is Up or not, you can check like this:
    dpmon pf=/usr/sap/<SID>/SYS/profile/instace profile name (If your Server O.S. is Solaris or Unix)
    it will show your work process are running or not.

  • Terminal Commands for Bluetooth?

    Hello,
    When looking at my system settings via the System Info function, I learn that there is a discrepancy between the actuall settings and whatever I belive is going on based on the System Preferences window.

    (My post didn't show up in it's entirety. Here is my complete post)
    Hello,
    When looking at my system settings via the System Info function, I learn that there is a discrepancy between the actual settings and whatever I believe is going on based on the System Preferences window.
    I have shut down all Bluetooth functionality using System Preferences, a I have disabled Bluetooth in the network settings. When viewing System Info, Bluetooth is enabled, live and well with specific custom settings. Does anyone know of a Terminal command(s) to shut down and prevent Bluetooth from working (I'm mainly concerned with file sharing but would like to shut down all functionality.
    Also, the same for the Airport as well.
    Danke

  • Terminal Commands for Internet Connect VPN?

    I could maybe do this as an applescript but I'm hoping there are terminal commands which I can incorporate into an rsync script...
    I need to open a PPTP VPN connection on a computer (Internet Connect VPN client, 10.4.8) , to connect to VPN services on OS X Server (10.4.8). The configuration works fine but really needs manual intervention at times. I would like to just script the equivalent of hitting the 'connect' button, so this can be run by cron.
    Any ideas or links?
    Ta.
    -david

    I did repair permissions with disk Utility and I used Onyx to delete the various caches, but that didn't work.
    Everything is functioning. The problem isn't on the VPN server side, because I can log into the VPN on my Powerbook and the status shows correctly. There's definitely something going on with my G5.
    This isn't a really huge deal, but it would be nice if the status indicated that I'm connected when I'm connected.

  • What Is The Terminal Command For PRAM & SMC Reset?

    Hi Folks - Cant get my Macbook Pro to shut down (instead it does a re-start) thus the key combination for these re-sets doesnt seem to function (no chimes). I saw in another thread a terminal command entry "sudo nvram boot-args=”-p -r” but I also saw it mentioned that entering that casued the following to pop-up "Note that resetting the PRAM will wipe out the contents of the boot-args environment variable, which means the command would need to be reissued each startup." Whats with "reissued each startup"? Also would like a an SMC re-set command. THANKS in advance!

    I dont know of a terminal command but here is how to reset the SMC:
    Resetting the System Management Controller (SMC)
    Resetting the SMC on Mac portables with a battery you can remove
    Shut down the computer.
    Disconnect the MagSafe power adapter from the computer, if it's connected.
    Remove the battery (to remove the battery - click here: MacBook or MacBook Pro).
    Press and hold the power button for 5 seconds.
    Release the power button.
    Reconnect the battery and MagSafe power adapter.
    Press the power button to turn on the computer.
    Resetting the SMC on portables with a battery you should not remove on your own
    Shut down the computer.
    Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
    On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
    Release all the keys and the power button at the same time.
    Press the power button to turn on the computer.

  • Permissions will not set, even after using terminal commands?

    Hey,
    I found a thread on here for using the terminal to type in commands for the user permissions and for the PSIX permissions on Leopard (10.5) server.  These commands are supposed to clean the server of all underlying(hidden) permissions that you cant see and then you are supposed to be able to then set the permissions again and finally, to hit "Propagate Permissions" so that all the permissions set for the shared volume then get farmed out to all sub files/folders.  This did not work when I tried it in the terminal, it said "Command not found" even after I typed in the admin password.  Is there anyone out there who can tell me the actual way to fix the old permissions and get new ones set?
    The story is:  We had an old server on a G4 when i first took control of the server, I took the shared hard drive out of the G4 and inserted it into a G5 and started using it with the leopard server.  the permissions did not really need to be set on that volume because they had carried over from the last time they were shared.  But we recently just got a Drobo unit for our server and I recently transferred all the shared files and folders over to the new volume, but ever since I cant get the permissions to farm out to all the stations, it shows me that its done on the server.  But when I go to access the files I am able to delete faculty folders where I had set the permissions to "read only" so I am wondering if there is a streamlined way of going about this or if I should just start from scratch and use all brand new HDD's?
    Please Help!

    Hi ..
    Try the tips mentioned here > Mini-tutorial: Force-deleting stubborn or problematic files in Mac OS X

  • Terminal Command for "Folders On Top" in Mountain Lion

    Looking for a terminal Command that will place all "Folders On Top", even in sub-folders. The utility I was using on Lion does'nt work on ML anymore.

    Looks like to me there has been a recent update to TotalFinder.  Claims to support 10.8, now. See
    http://www.macupdate.com/app/mac/33373/totalfinder
    I misunderstood your questions.  I thought you wanted to display the files in the Terminal.  You want to change the way the finder displays files.
    Robert

  • Terminal command for full username?

    Is there a command in Terminal that outputs the full username of the user? For example, instead of outputting "bob" it would give "Bob Smith".

    You would have to define your own PS1 prompt string and insert the long name in it.
    As for getting the long name, I don't know if this is the best way to do it, but it is a way to do it:
    dscacheutil -q user -a name bob | fgrep gecos | sed -e 's/.*gecos: \(.*\)/\1/'
    This assumes you short name is "bob".  It should yield the corresponding long name.
    I'll leave as an exercise for you to use that command to set a shell variable to be added to a PS1 prompt string in the way you prefer it.  But here's a simple example:
    longname=$(dscacheutil -q user -a name bob | fgrep gecos | sed -e 's/.*gecos: \(.*\)/\1/')
    PS1="$longname: "
    Now the terminal prompt line would be (assuming Bob Smith is the long name for bob):
    Bob Smith:
    I guess I have to ask, why would you want to do this (use the long name that is)?

  • Automate Terminal command for Adobe Update Server

    Hi all,
    I'm using and internal Adobe Server to distribute the applications updates to all the clients.
    The internal server need to be updated via Terminal, using this command
    sudo /Applications/Utilities/Adobe\ Application\ Manager/CCP/utilities/AUSST/AdobeUpdateServerSetupTool --root="Volumes/Backup_Interno/AdobeServer" --incremetal
    I would like to use Automator to launch this command every sunday at 8AM, possibly without manually insert the admin password.
    Can someone help with this?
    Thanks

    hi ned
    thanks for answer
    i setup adobe update server with IIS (AUSST), when i start downloading the updates for the inhouse server it automatic creates 2 dirctories (MAC and WIN) and download the whole adobe updates for MAC and WIN together, the question is if i can download the updates only for Windows without MAC
    Sharoni

Maybe you are looking for