Skip to end of metadata
Go to start of metadata

SmartMachines provisioned from a SmartMachine Standard image include pre-defined scripts for collecting information on how your SmartMachine is using various resources. 

  • sm-cpuinfo: Displays the CPU cap currently in use and the percentage of system CPU currently in use.
  • sm-meminfo: Displays the memory cap, the amount of memory currently in use and the amount of memory currently free.
  • sm-summary: Displays a summary of important properties of the SmartMachine. For example, SmartMachine UUID, SmartMachine hostname, pkgsrc repository used, and so on. This script also provides information similar to the sm-cpuinfo and sm-meminfo scripts.
  • sm-list-timezones: List all the supported timezones for a SmartMachine.
  • sm-set-timezone: Set the timezone to a specific region for a SmartMachine.
  • sm-lsof: Show the mapping between processes and ports.

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:

  1. SSH into the machine.
  2. 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:

  1. SSH into your machine.
  2. 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:

  1. SSH into your machine.
  2. 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:

  1. SSH into your SmartMachine
  2. 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:

  1. SSH into your SmartMachine.
  2. 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.

  3. 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:

  1. SSH into your SmartMachine.
  2. 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:

Labels:
sm-cpuinfo sm-cpuinfo Delete
sm-meminfo sm-meminfo Delete
sm-summary sm-summary Delete
sm-list-timezone sm-list-timezone Delete
sm-set-timezone sm-set-timezone Delete
sm-pcp sm-pcp Delete
smartmachine smartmachine Delete
standard standard Delete
system system Delete
information information Delete
memory memory Delete
cpu cpu Delete
summary summary Delete
process process Delete
mapping mapping Delete
script script Delete
setting setting Delete
listing listing Delete
timezone timezone Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.