1. Bicom Systems
  2. Solution home
  3. Quick problem solving documents
  4. Quick problem solving documents

Linux CLI Cheat Sheet

Check Resource Usage:

top

This command has a lot of integrated options. For more information you can check the man pages:

man top


Checking Memory Usage:

free -m


Check Running Processes:

ps fax

This can be filtered with 'grep' in case you are looking for a specific process. For example:

ps fax | grep -i asterisk


Recordings Storage Usage (MT):

du -sh /opt/pbxware/pw/var/spool/asterisk/monitor/* | sort -rh | awk '$1 ~ /[0-9]+M|[0-9]+G/ && $1 !~ /K/ && $1 >= 1'


Recordings Storage Usage (CC):

du -sh /opt/pbxware/pw/var/spool/asterisk/monitor


Check If Updates Are Available:

/opt/pbxware/sh/update --dry-run
/opt/httpd/sh/update --dry-run


License Refresh:

/opt/pbxware/sh/license_refresh


Check For Core Dumps:

ls -lah /opt/pbxware/pw/tmp | grep core


Check If Call Recording Exists (MT):

ls -lah /opt/pbxware/pw/var/spool/asterisk/monitor/500 | grep "1706581840.4"

Where '500' is the tenant number and '1706581840.4' the unique call id.


Check If Call Recording Exists (CC):

ls -lah /opt/pbxware/pw/var/spool/asterisk/monitor | grep "1706581840.4"

Where '1706581840.4' is the unique call id.


See/Check The PBXware Version:

head /opt/pbxware/pw/pbxware/pbxware.php