Get Virtualizor

List Processes

Use List Processes API to get information about the all the processes running on VPS of your server.

HTTP Request

https://hostname:4083/index.php?act=processes&svs=vpsid

Parameters

NameTypeValueDescriptionRequired
actGETprocessesThe action will display a list of processesYes
svsPOSTvpsidThe vpsid whose processes need to be listed. Sent using URL.Yes
vidPOSTIntThe vpsid whose processes need to be listed. Sent as a post parameter.Yes

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  'your_api_key';
    $pass = 'your_api_pass';
    $ip = 'your_server_ip';

    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $vid = 3615;
    $output = $admin->processes($vid);

    print_r(json_encode($output));
?>

Curl

curl -k -X GET -L "https://hostname:4083/index.php?act=processes& 
svs=3615&api=json&apikey=your_api_key& 
apipass=your_api_pass"

Output

{
    "uid": "372",
    "act": "processes",
    "timezone": 1,
    "timenow": "October 11, 2016, 1:11 am",
    "vpsid": 3615,
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "language": "english",
        "theme": "default",
        "timezone": 1,
        "logo": ""
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": "12"
    },
    "pdns": {
        "pdnsid": "12"
    },
    "support_link": "http://softaculous.com",
    "title": "List of Processes",
    "processes": [{
        "PID": "1",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3564",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:01",
        "COMMAND": "init -z"
    }, {
        "PID": "2",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[kthreadd/105]"
    }, {
        "PID": "3",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "0",
        "TT": "?",
        "STAT": "S",
        "TIME": "00:00:00",
        "COMMAND": "[khelper/105]"
    }, {
        "PID": "75",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.2",
        "RSS": "2456",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-journald"
    }, {
        "PID": "83",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1680",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-udevd"
    }, {
        "PID": "120",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1524",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/lib/systemd/systemd-logind"
    }, {
        "PID": "122",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.3",
        "RSS": "3596",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/usr/sbin/sshd -D"
    }, {
        "PID": "128",
        "USER": "dbus",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1648",
        "TT": "?",
        "STAT": "Ss",
        "TIME": "00:00:00",
        "COMMAND": "/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation"
    }, {
        "PID": "144",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "796",
        "TT": "tty2",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear tty2 linux"
    }, {
        "PID": "145",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.0",
        "RSS": "792",
        "TT": "tty1",
        "STAT": "Ss+",
        "TIME": "00:00:00",
        "COMMAND": "/sbin/agetty --noclear --keep-baud console 115200 38400 9600 vt220"
    }, {
        "PID": "6314",
        "USER": "root",
        "%CPU": "0.0",
        "%MEM": "0.1",
        "RSS": "1636",
        "TT": "?",
        "STAT": "Rs",
        "TIME": "00:00:00",
        "COMMAND": "ps ax -eo pid,user,pcpu,pmem,rss,tty,stat,time,command"
    }],
    "processes_head": ["PID", "USER", "%CPU", "%MEM", "RSS", "TT", "STAT", "TIME", "COMMAND"],
    "time_taken": "0.294"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list