Processes

Attributes

uid (read-only) Unique id for the process in our system which consists of server + “_” + pid + “_” + creation_time.
create_time (read-only) The time the process was created.
name (read-only) The name for this process.
pid (read-only) The operating system assigned process id (commonly called pid) for this process.
args (read-only) The command line args used when starting this process.
server_id (read-only) The ID of the server this process is running on.

Available APIs

/api/processes/{uid}/data/

Retrieves historical data for the given process. Each piece of process data may have the following attributes (if some data isn’t given it means the values don’t exist for this process for that minute):

time The minute this data is for.
cpu The CPU value in percent.
memory The memory usage in bytes.
page_faults The number of page faults.
thread_num The number of threads.
socket_write Outbound network traffic in bytes.
socket_read Inbound network traffic in bytes.
socket_num The number of network connections.
file_read Data read from files in bytes
file_write Data written to files in bytes.
file_num The number of files accessed.
registry_num The number of registries accessed.
critical_log The number of critical incident reports logged.
total_log The number of total incident reports logged.
avg_response_time The average response time of socket transactions in microseconds.
response_num The number of socket responses sent (you can have multiple responses on a single network/socket connection).

GET

Gets data for the given process. It gets up to “num” points starting from “end” and going back to “start.”

Arguments

  • num (optional, default:1) – Retrieve up to this many number of points. Note that there can be gaps in the data if the server this process is on has an outage.
  • end (optional, default:most recent point) – Retrieve data from this timestamp backwards. If not given, it gets the most recent data.
  • start (optional) – Don’t retrieve any points before this date, if given.
  • time_step (optional, default:Minute) – Time step for the points, can be: Minute, Hour, Day.

Argument Examples

  • num=3 – will get the three most recent minutes of data.
  • num=1440&start=<12:00am today> – will get all of today’s data (which will probably be less than 1440 points).
  • num=3&end=1288584000 – will get the three minutes of data just before Nov. 11, 2010 UTC (which is 1288584000). If all the data exists, this will be 1288584000, 1288583940, and 1288583880. If the middle minute of data didn’t exist it would return 1288584000 and 1288583880.
  • num=30&end=1288584000&start=1288583940 – will get 2 minutes of data (if they exist) from 1288584000 and 1288583940.
  • num=3&time_step=Hour – will get the three most recent hours of data.
curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/processes/1_2_12960681618000000/data/?num=2
{
    "pagination": {
        "count": 1, 
        "previous": null, 
        "next": null
    }, 
    "data": [
        {
            "thread_num": 1, 
            "time": 1423628400, 
            "socket_num": 23423, 
            "file_write": 23452432, 
            "registry_num": 23, 
            "response_num": 42, 
            "page_faults": 5, 
            "socket_write": 2243, 
            "flags": 0, 
            "socket_read": 35353, 
            "memory": 7770112, 
            "file_num": 10, 
            "file_read": 0, 
            "cpu": 0.8
        }
    ]
}

/api/processes/{uid}/detail/

Retrieves historical detail data for a given process. Each piece of detail data can have the following attributes, which are each an array of individual items. Each individual item is a mapping of title to value. Not all attributes will be included for all processes.

files A list of files accessed.
threads A list of threads in the process.

GET

Gets data for the given server.

  • time (optional, default:latest) – Get detail data for this minute, if not given we return the most recent minute.
curl --user {EMAIL}:{API_KEY} https://wwws.appfirst.com/api/processes/1_2_12960681618000000/detail/
{
    "pagination": {
        "count": 2, 
        "previous": null, 
        "next": null
    }, 
    "data": {
        "files": [
            "/var/log/httpd/error_log", 
            "/v5/null", 
            "/var/log/httpd/access.log", 
            "/var/log/httpd/error.log", 
            "/v5/urandom", 
            "/var/log/httpd/access_log", 
            "pipe:[378466653]", 
            "/var/log/httpd/ssl_access.log"
        ], 
        "threads": [
            {
                "TID": "10207", 
                "StackSize": "90112", 
                "CreateTime": "13068060870419882", 
                "KernelTime": "970000", 
                "UserTime": "400000"
            }
        ]
    }
}