|
SmartMachines provisioned from a SmartMachine Standard image include pre-defined scripts for collecting information on how your SmartMachine is using various resources.
In this topic: |
At a Glance
This topic shows you how to gather system information on SmartMachines provisioned from a SmartMachine Standard image. |
Memory System Information
The sm-meminfo script collects information about how your system uses memory compared to the total amount installed.
Before you Begin
Before invoking this script, ensure you know the following. You will pass these in as arguments for the script:
- The type of memory installed in the machine: rss or swap.
- Specify that you want to generate the system information in a format that is machine readable. The default is to display the output in human readable format. Use the -p option to specify this.
Invoking the Script
To invoke the script:
- SSH into the machine.
- Run the sm-meminfo command specifying the type of memory and if you want to generate the information in a machine-readable format. The script will gather memory system information and display it onscreen. For example:
The following is the same information in a human-readable format:
CPU System Information
The sm-cpuinfo script collects information about how your system uses available CPU resources compared to the total amount available.
| You do not need to pass in any options or arguments to invoke this script. |
Invoking the Script
To invoke the script:
- SSH into your machine.
- Run the sm-cpuinfo command. The script will gather CPU system information and display it onscreen. For example:
System Summary
The sm-summary script collects a basic system summary that includes important properties of the SmartMachine. The information collected from this script is useful for troubleshooting possible issues with your SmartMachine that you can quickly share with support representatives. This script also provides information about installed memory and memory usage.
| You do not need to pass in any options or arguments to invoke this script. |
Invoking the Script
To invoke the script:
- SSH into your machine.
- Run the sm-summary command. The script will gather information on system properties and display it onscreen. For example:
Working with Timezones
You can use the timezone scripts to find a specific timezone and set your SmartMachine to that timezone. These scripts are located in /opt/local/bin/sm-list-timezones and /opt/local/bin/sm-set-timezone respectively.
Listing Timezones
Use this script to generate a list of values that you can use with the sm-set-timezone command. You invoke this script by running the sm-list-timezones command. The location of this script is /opt/local/bin/sm-list-timezones.
| You do not need to pass in any options or arguments to invoke this script. |
Invoking the Script
To invoke the script:
- SSH into your SmartMachine
- Run the sm-list-timezones command. The script will generate a large list of timezone values that you can then use with the sm-set-timezone command.
Setting a Timezone
Use this script to set the timezone of a SmartMachine to the region you specify. You invoke this script by running the sm-set-timezone command. The location of this script is /opt/local/bin/sm-set-timezone.
Before you Begin
Before invoking this script, ensure you know the following. You will pass this in an argument for the script:
- The timezone to which you want to set the SmartMachine. You can use the sm-list-timezones command to find the value you need.
Invoking the Script
To invoke the Script:
- SSH into your SmartMachine.
- Run the sm-set-timezone command specifying the timezone to which you want to set the SmartMachine. For example:
The script will set the timezone and prompt you to reboot the system for the change to take affect.
- Reboot the system.

You can reboot the system by running the sm-reboot script.
Process Mapping
Use this script to determine how processes are mapped to ports, files, and directories. You invoke this script by running the sm-lsof command. The location of this script is /opt/local/bin/sm-lsof.
Available Options
| Option | Description |
|---|---|
| -p | Displays port information for all running processes including the associated process ID (PID), IP, and port. |
| -f | Displays file information for all processes on the system including the associated process ID and file/device. |
| -P <PID> | Displays all ports used for a process specified by the process ID. |
| -F <PID> | Displays all files used for a process specified by the process ID. |
| -o <port> | Displays all processes that map to the specified port. |
| -i <file> | Displays all processes that map to the specified file. |
| -d <directory> | Displays all processes that map to the specified directory. |
Invoking the Script
To invoke the script:
- SSH into your SmartMachine.
- Run the sm-lsof command specifying an option:
For example, to see a list of all running processes:
To determine which processes map to port 22:
To determine which ports map to processes with a PID of 85993: