The pmd-nextgen package contains the photon-mgmtd tool. photon-mgmtd is a high-performing, open-source, lightweight, pluggable REST API gateway designed with stateless architecture. photon-mgmtd is written in Go and built with performance in mind. It facilitates real-time configuration, performance analysis, and health monitoring of systems, networks, services, and applications.
photon-mgmtd is optimized to provide the following benefits:
The proactive monitoring and analytics features help the administrator to efficiently collect analytical data for performance and health management of systems.
For remote access, you can use the platform-independent REST APIs via any application on any Operating system. For example, you can use applications such as Curl/Chrome/Postman on any operating system such as Linux/iOS/Android/Windows and so on.
Minimal data transfer using JSON.
Plugin based architecture for easier operation.
1 - Features
The following table lists the photon-mgmtd features details:
Feature
Details
systemd
Information, services (start, stop, restart, status), service properties such as CPUShares
see information from /proc fs
netstat, netdev, memory and much more
2 - Installing photon-mgmtd
You can install photon-mgmtd using the pmd-nextgen package. The pmd-nextgen package is included in your Photon OS 4.0 Rev 2 distribution. To install pmd-nextgen, run the following command:
To configure photon-mgmtd, use the mgmt.toml file located in the following directory: /etc/photon-mgmt/
You can set values for the following keys in the [System] section:
LogLevel=
Specifies the log level. The key takes one of the following:
values: Trace, Debug, Info, Warning, Error, Fatal and Panic.
Default is info.
UseAuthentication=
Specifies whether a user needs authentication. This is a boolean key and takes the following values: true, false.
Default is true.
You can set values for the following keys in the [Network] section:
Listen=
Specifies the IP address and port that the REST API server listens to.
When enabled, the default is 127.0.0.1:5208.
ListenUnixSocket=
Specifies whether you want the server to listen on a unix domain socket /run/photon-mgmt/mgmt.sock. This is a boolean key and takes the following values: true, false.
Default is true.
Note: When you enable both ListenUnixSocket= and Listen=, server listens on the unix domain socket by default.
❯ sudo cat /etc/photon-mgmt/mgmt.toml
[System]
LogLevel="info"
UseAuthentication="false"
[Network]
ListenUnixSocket="true"
❯ sudo systemctl status photon-mgmtd.service
● photon-mgmtd.service - A REST API based configuration management microservice gateway
Loaded: loaded (/usr/lib/systemd/system/photon-mgmtd.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-01-06 16:32:19 IST; 4s ago
Main PID: 230041 (photon-mgmtd)
Tasks: 6 (limit: 15473)
Memory: 2.9M
CPU: 7ms
CGroup: /system.slice/photon-mgmtd.service
└─230041 /usr/bin/photon-mgmtd
Jan 06 16:32:19 Zeus systemd[1]: photon-mgmtd.service: Passing 0 fds to service
Jan 06 16:32:19 Zeus systemd[1]: photon-mgmtd.service: About to execute /usr/bin/photon-mgmtd
Jan 06 16:32:19 Zeus systemd[1]: photon-mgmtd.service: Forked /usr/bin/photon-mgmtd as 230041
Jan 06 16:32:19 Zeus systemd[1]: photon-mgmtd.service: Changed failed -> running
Jan 06 16:32:19 Zeus systemd[1]: photon-mgmtd.service: Job 56328 photon-mgmtd.service/start finished, result=done
Jan 06 16:32:19 Zeus systemd[1]: Started photon-mgmtd.service - A REST API based configuration management microservice gateway.
Jan 06 16:32:19 Zeus systemd[230041]: photon-mgmtd.service: Executing: /usr/bin/photon-mgmtd
Jan 06 16:32:19 Zeus photon-mgmtd[230041]: time="2022-01-06T16:32:19+05:30" level=info msg="photon-mgmtd: v0.1 (built go1.18beta1)"
Jan 06 16:32:19 Zeus photon-mgmtd[230041]: time="2022-01-06T16:32:19+05:30" level=info msg="Starting photon-mgmtd... Listening on unix domain socket='/run/photon-mgmt/mgmt.sock' in HTTP mode pid=103575">
How to Configure Users?
Unix domain socket
When you add users to the photon-mgmt group, they can access the unix socket.
Use the following command to add a user:
# usermod -a -G photon-mgmt exampleusername
4 - photon-mgmtd API
Use photon-mgmtd REST-APIs to manage, control, configure, and monitor services remotely.
You can use photon-mgmtd to manage the following:
Services
System
Network
User, Group, Host
4.1 - Service Management
POST Method
To manage the available services and take actions on the services, execute a POST request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"action":"{command}”,”unit”:”{unit}"}' http://localhost/api/v1/service/systemd
The following table lists the parameters:
Parameter
Description
Unit
The name of the service you want to manage.
Action Commands
The action you want to take on the service. Start, stop, restart, try-restart, reload-or-restart, reload, enable, disable, mask, unnmask, kill
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"action":"start","unit":"nginx.service"}' http://localhost/api/v1/service/systemd
Response:
{
"success":true,
"message":"",
"errors":""
}
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"action":"stop","unit":"nginx.service"}' http://localhost/api/v1/service/systemd
Response:
{
"success":true,
"message":"",
"errors":""
}
GET Method:
Status of all the services:
The systemctl list-unit-files command lists all the services available in the system.
To fetch the list of services listed in the list-unit files, execute a GET request in the following format:
The name of the service for which you want to get the status.
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock http://localhost:5208/api/v1/service/systemd/nginx.service/status | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 514 100 514 0 0 38298 0 --:--:-- --:--:-- --:--:-- 39538
The name of the service for which you want to fetch the properties.
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock http://localhost/api/v1/service/systemd/nginx.service/propertyall | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9652 0 9652 0 0 1058k 0 --:--:-- --:--:-- --:--:-- 1178k
Configuration Details
To receive the configuration details, execute a GET request in the following format:
To fetch the complete system information, execute a GET request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/describe
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/describe | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5588 0 5588 0 0 42133 0 --:--:-- --:--:-- --:--:-- 42015
CPU Information
To fetch information related to CPU, execute a GET request in the following format:
You can use the pmctl tool to fetch the sysctl configuration details. The following section lists the commands related to various use cases of sysctl configuration.
sysctl Configuration Details
To fetch all the sysctl configuration details in the system, use the following command in the pmctl tool:
pmctl status sysctl
Specific Variable Configuration in sysctl
To fetch a specific variable configuration in the sysctl configuration, use the following command in the pmctl tool:
pmctl status sysctl k <InputKey>
or
pmctl status sysctl key <InputKey>
Example:
>pmctl status sysctl k fs.file-max
fs.file-max: 9223372036854775807
Variable Configuration in sysctl
To fetch all the variable configuration in the sysctl configuration based on the input pattern, use the following command in the pmctl tool:
pmctl status sysctl p <InputPatern>
or
pmctl status sysctl pattern <InputPatern>
Example:
pmctl status sysctl p net.ipv6.route.gc{
"net.ipv6.route.gc_elasticity":"9",
"net.ipv6.route.gc_interval":"30",
"net.ipv6.route.gc_min_interval":"0",
"net.ipv6.route.gc_min_interval_ms":"500",
"net.ipv6.route.gc_thresh":"1024",
"net.ipv6.route.gc_timeout":"60"
}
Add or Update Variable Configuration in sysctl
To add or Update a variable configuration in the sysctl configuration, use the following command in the pmctl tool.
pmctl sysctl u -k <InputKey> -v <InputValue> -f <InputFile>
or
pmctl sysctl update key <InputKey> value <InputValue> filename <InputFile>
Examples:
pmctl sysctl u -k fs.file-max -v 65566 -f 99-sysctl.conf
pmctl sysctl u -k fs.file-max -v 65566
Remove Variable Configuration in sysctl
To remove a variable configuration in the sysctl configuration, use the following command in the pmctl tool:
To load sysctl configuration files, execute a POST request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"apply":true,"files":["<fileName>","<fileName>"]}' http://localhost/api/v1/system/sysctl/load
Example:
>curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"apply":true,"files":["99-sysctl.conf","75-sysctl.conf"]}' http://localhost/api/v1/system/sysctl/load
4.3 - Network Management
GET Method
Network Details
To fetch complete network details, execute a GET request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/network/describe | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5238 0 5238 0 0 88919 0 --:--:-- --:--:-- --:--:-- 90310
root@photon [ ~/4.0/photon ]# curl --unix-socket /run/photon-mgmt/mgmt.sock http://localhost/api/v1/network/netlink/route | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1407 100 1407 0 0 996k 0 --:--:-- --:--:-- --:--:-- 1374k
To fetch the network DNS status, use the following command in pmctl:
>pmctl status network dns
Global
DNS: 8.8.8.1 8.8.8.2
DNS Domains: test3.com test4.com . localdomain . localdomain
Link 2 (ens33)
Current DNS Server: 172.16.61.2
DNS Servers: 172.16.61.2
Link 3 (ens37)
Current DNS Server: 172.16.61.2
DNS Servers: 172.16.61.2
Network iostat Status
To fetch the network iostat status, use the following command in pmctl:
>pmctl network remove-netdev ipvlan1 dev ens37 kind ipvlan
Configure link using pmctl
Use the following commands to configure links using the pmctl command.
Configure Link MACAddress
pmctl link set-mac dev <deviceName> macpolicy <MACAddressPolicy> macaddr <MACAddress>
Example:
>pmctl link set-mac dev eth0 macpolicy none macaddr 00:a0:de:63:7a:e6
Configure Link Name
pmctl link set-name dev <deviceName> namepolicy <NamePolicy> name <Name>
Example:
>pmctl link set-name dev ens37 namepolicy mac,kernel,database,onboard,keep,slot,path
Configure Link AlternativeNames
pmctl link set-name dev <deviceName> altnamespolicy <AlternativeNamesPolicy> altname <AlternativeName>
Example:
>pmctl link set-alt-name dev ens37 altnamespolicy mac,database,onboard,slot,path
Configure Link ChecksumOffload
pmctl link set-csum-offload dev <deviceName> rco <ReceiveCheksumOffload> tco <TransmitChecksumOffload>
Example:
>pmctl link set-csum-offload dev ens37 rxco true txco true
Configure Link TCPSegmentationOffload
pmctl link set-tcp-offload dev <deviceName> tcpso <TCPSegmentationOffload> tcp6so <TCP6SegmentationOffload>
Example:
>pmctl link set-tcp-offload dev ens37 tcpso true tcp6so true
Configure Link GenericOffload
pmctl link set-generic-offload dev <deviceName> gso <GenericSegmentationOffload> gro <GenericReceiveOffload> grohw <GenericReceiveOffloadHardware> gsomaxbytes <GenericSegmentOffloadMaxBytes> gsomaxseg <GenericSegementOffloadMaxSegments>
Example:
>pmctl link set-generic-offload dev ens37 gso true gro true grohw false gsomaxbytes 65536 gsomaxseg 65535
Configure Link VLANTAG
pmctl link set-vlan-tags dev <deviceName> rxvlanctaghwacl <ReceiveVLANCTAGHardwareAcceleration> txvlanctaghwacl <TransmitVLANCTAGHardwareAcceleration> rxvlanctagfilter <ReceiveVLANCTAGFilter> txvlanstaghwacl <TransmitVLANSTAGHardwareAcceleration>
Example:
>pmctl link set-vlan-tags dev ens37 rxvlanctaghwacl true txvlanctaghwacl false rxvlanctagfilter true txvlanstaghwacl true
Configure Link Channels
pmctl link set-channel dev <deviceName> rxch <RxChannels> txch <TxChannels> oth <OtherChannels> coch <CombinedChannels>
Example:
>pmctl link set-channel dev ens37 rxch 1024 txch 2045 och 45678 coch 32456
Configure Link Buffers
pmctl link set-buffer dev <deviceName> rxbufsz <RxBufferSize> rxmbufsz <RxMiniBufferSize> rxjbufsz <RxJumboBufferSize> txbufsz <TxBufferSize>
Example:
>pmctl link set-buffer dev ens37 rxbufsz 100009 rxmbufsz 1998 rxjbufsz 10999888 txbufsz 83724
Configure Link Queues
pmctl link set-queue dev <deviceName> rxq <ReceiveQueues> txq <TransmitQueues> txqlen <TransmitQueueLength>
Example:
>pmctl link set-queue dev ens37 rxq 4096 txq 4096 txqlen 4294967294
Configure Link FlowControls
pmctl link set-flow-ctrl dev <deviceName> rxfctrl <RxFlowControl> txfctrl <TxFlowControl> anfctrl <AutoNegotiationFlowControl>
Example:
>pmctl link set-flow-ctrl dev ens37 rxfctrl true txfctrl true anfctrl true
Configure Link UseAdaptiveCoalesce
pmctl link set-adpt-coalesce dev <deviceName> uarxc <UseAdaptiveRxCoalesce> uatxc <UseAdaptiveTxCoalesce>
Example:
>pmctl link set-adpt-coalesce dev ens37 uarxc true uatxc true
Configure Link ReceiveCoalesce
pmctl link set-rx-coalesce dev <deviceName> rxcs <RxCoalesceSec> rxcsirq <RxCoalesceIrqSec> rxcslow <RxCoalesceLowSec> rxcshigh <RxCoalesceHighSec>
Example:
>pmctl link set-rx-coalesce dev ens37 rxcs 23 rxcsirq 56 rxcslow 5 rxcshigh 76788
Configure Link TransmitCoalesce
pmctl link set-tx-coalesce dev <deviceName> txcs <TxCoalesceSec> txcsirq <TxCoalesceIrqSec> txcslow <TxCoalesceLowSec> txcshigh <TxCoalesceHighSec>
Example:
>pmctl link set-tx-coalesce dev ens37 txcs 23 txcsirq 56 txcslow 5 txcshigh 76788
Configure Link ReceiveMaxCoalescedFrames
pmctl link set-rx-coald-frames dev <deviceName> rxcmf <RxMaxCoalescedFrames> rxcmfirq <RxMaxCoalescedIrqFrames> rxcmflow <RxMaxCoalescedLowFrames> rxcmfhigh <RxMaxCoalescedHighFrames>
Example:
>pmctl link set-rx-coald-frames dev ens37 rxmcf 23 rxmcfirq 56 rxmcflow 5 rxmcfhigh 76788
Configure Link TransmitMaxCoalescedFrames
pmctl link set-tx-coald-frames dev <deviceName> txcmf <TxMaxCoalescedFrames> txcmfirq <TxMaxCoalescedIrqFrames> txcmflow <TxMaxCoalescedLowFrames> txcmfhigh <TxMaxCoalescedHighFrames>
Example:
>pmctl link set-tx-coald-frames dev ens37 txmcf 23 txmcfirq 56 txmcflow 5 txmcfhigh 76788
Configure Link CoalescePacketRate
pmctl link set-coalesce-pkt dev <deviceName> cprlow <CoalescePacketRateLow> cprhigh <CoalescePacketRateHigh> cprsis <CoalescePacketRateSampleIntervalSec>
Example:
>pmctl link set-coalesce-pkt dev ens37 cprlow 1000 cprhigh 32456 cprsis 102
Configure Other Links
You can configure links for Alias, Description, port, duplex, and so on.
pmctl link set-link dev ens37 alias <Alias> desc <Description> mtub <MTUBytes> bits <BitsPerSecond> duplex <Duplex> auton <AutoNegotiation> wol <WakeOnLan> wolpassd <WakeOnLanPassword> port <Port> advertise <Advertise> lrxo <LargeReceiveOffload> ntf <NTupleFilter> ssbcs <StatisticsBlockCoalesceSec>
Example:
>pmctl link set-link dev ens37 alias ifalias desc configdevice mtub 10M bits 5G duplex full auton no wol phy,unicast,broadcast,multicast,arp,magic,secureon wolpassd cb:a9:87:65:43:21 port mii advertise 10baset-half,10baset-full,20000basemld2-full lrxo true ntf true ssbcs 1024
Ethtool status
To fetch the Ethtool Status, use the following command:
\#Get Ethtool all status
pmctl status ethtool <LINK>
Example:
>pmctl status ethtool ens37
\#Get Ethtool status based on action
pmctl status ethtool <LINK> <ACTION>
Example:
>pmctl status ethtool ens37 bus
4.4 - User, Group, and Host Management
POST Method
Add a Group
To add a group, execute a POST request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"Name":"photon","Gid":"1125"}' http://localhost/api/v1/system/group/add
The following table lists the parameter:
Parameter
Description
Gid
ID of the group that you want to add.
Name
Name of the group that you want to add.
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request POST --data '{"Name":"photon","Gid":"1125"}' http://localhost/api/v1/system/group/add
To modify the name of a group, execute a PUT request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request PUT --data '{"Name":"photon6","NewName":"photon33"}' http://localhost/api/v1/system/group/modify
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request PUT --data '{"Name":"photon6","NewName":"photon33"}' http://localhost/api/v1/system/group/modify
GET Method
Host Details
To fetch the details of the host, execute a GET request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/hostname/describe
Example:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/hostname/describe | jq % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 585 100 585 0 0 8374 0 --:--:-- --:--:-- --:--:-- 8478
Login Status
You can use the pmctl tool to get login details of users. The following section lists the commands you can use to get the user details.
List Users
To list all the logged in users, use the following command in the pmctl tool:
>pmctl status login user
List Sessions
To list all the logged in sessions, use the following command in the pmctl tool:
>pmctl status login session
Get User based on UID
To get the status of users based on user ID, use pmctl command in the following format:
pmctl status login user <UID>
Example:
>pmctl status login user 2
Get Session based on ID
To get the status of logged in sessions based on the users ID, use the pmctl command in the following format:
pmctl status login session <ID>
Example:
>pmctl status login session 1000
Group Details Using pmctl tool
You can get the group details using commands in pmctl tools. The following section lists the commands you can use in the pmctl tool to get various group details.
Get all Group Details
To fetch all the group details, use the following command in the the pmctl tool.
>pmctl status group
Gid: 0
Name: root
Gid: 1
Name: daemon
Gid: 2
Name: bin
Gid: 3
Name: sys
Gid: 4
Name: adm
.
.
.
Gid: 1001
Name: photon-mgmt
Get specific Group Details
To fetch specific group details, use the following commands in the pmctl tool:
pmctl status group <GroupName>
or
pmctl status group <GroupName>
Example:
>pmctl status group photon-mgmt
Gid: 1001
Name: photon-mgmt
Add a new Group
To add a new group, use the following command in the pmctl tool:
pmctl group add <GroupName> <Gid>
or
pmctl group add <GroupName>
Remove a Group
To remove a group, us the followong command in the omctl tool:
pmctl group remove <GroupName> <Gid>
or
pmctl group remove <GroupName>
Group Details Using cURL command
The following section list the cURL commands that you can use to fetch the groups details.
Get all Group information
To fetch the group details, execute a GET request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/group/view
Get particuller Group information.
To fetch a specific group details, execute a GET request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/group/view/<GroupName>
User Details Using pmctl Tool
You can use the pmctl tool to get the user details. The following section lists the commands to get the user details.
Get all User Details
To get all the user details, use the following command in the pmctl tool:
>pmctl status user
User Name: root
Uid: 0
Gid: 0
GECOS: root
Home Directory: /root
User Name: daemon
Uid: 1
Gid: 1
GECOS: daemon
Home Directory: /usr/sbin
User Name: bin
Uid: 2
Gid: 2
GECOS: bin
Home Directory: /bin
User Name: sys
Uid: 3
Gid: 3
GECOS: sys
Home Directory: /dev
User Name: photon-mgmt
Uid: 1001
Gid: 1001
Home Directory: /home/photon-mgmt
Add a New User
To add a new user, use the following command in the pmctl tool:
pmctl user add <UserName> home-dir <HomeDir> groups <groupsList> uid <Uid> gid <Gid> shell <Shell> password <xxxxxxx>
or
pmctl user a <UserName> -d <HomeDir> -grp <groupsList> -u <Uid> -g <Gid> -s <Shell> -p <xxxxxxx>
Remove a User
To remove a user, use the following command in the pmctl tool:
pmctl user remove <UserName>
or
pmctl user r <UserName>
GET User Details
To fetch user details, execute a GET request in the following format:
curl --unix-socket /run/photon-mgmt/mgmt.sock --request GET http://localhost/api/v1/system/user/view
4.5 - Package Management
You can use the pmctl commands to manage the available packages and perform various actions on the packages. The following section lists the pmctl commands for various services related to package management.
List all packages
To list all the packages, use the following command in pmctl:
pmctl pkg list
Example:
>pmctl pkg list
List specific packages
To list a specific package, use the following command in pmctl:
pmctl pkg list <pkg>
Example:
>pmctl pkg list lsof
Package Details
To get the details of a specific package, use the following command in pmctl:
pmctl pkg info <pkg>
Example:
pmctl pkg info lsof
Download metadata
To download the package metadata, use the following command in pmctl:
pmctl pkg makecache
Example:
>pmctl pkg makecache
Clean cache
To clean the package cache, use the following command in pmctl:
pmctl pkg clean
Example:
>pmctl pkg clean
List repositories
To list the repositories, use the following command in pmctl:
pmctl pkg repolist
Example:
pmctl pkg repolist
Search packages
To search a specific package, use the following command in pmctl:
pmctl pkg search <pattern>
Example:
pmctl pkg search lsof
Get update info
To get the update details of the packages, use the following commands in pmctl:
To get the netstat details, use the following command in pmctl:
pmctl status proc netstat <PROTOCOL>
Example:
>pmctl status proc netstat tcp
Process status
To get the process status details, use the following command in pmctl:
pmctl status proc process <PID> <PROPERTY>
Example:
>pmctl status proc process 88157 pid-memory-percent
Protopidstat status
To get the protopidstat status details, use the following command in pmctl:
pmctl status proc protopidstat <PID> <PROTOCOL>
Example:
>pmctl status proc protopidstat 89502 tcp
5 - Writing a Plugin
photon-mgmtd is designed with a robust plugin-based architecture in mind. You can easily add and remove modules to photon-mgmtd. The plugins are separate modules with well-defined interfaces that make implementing application features easier. You can create custom versions of an application with minimal source code modifications.
You can perform the following steps to write a plugin:
Choose a namespace under plugins directory (systemd, system, proc) where you want to put your module.
Write the sub router. For example, plugins/systemd/
Write your module: module.go and module_router.go
Write RegisterRouterModule
Register RegisterRouterModule with the parent router.
For example, for login registered with RegisterRouterSystem under system namespace, write login.RegisterRouterLogin.
You can use the pmctl tool to view and configure system, network, and service status. The following example illustrates how to view the status:
Service status:
❯ pmctl service status nginx.service
Name: nginx.service
Description: The nginx HTTP and reverse proxy server
MainPid: 45732
LoadState: loaded
ActiveState: active
SubState: running
UnitFileState: disabled
StateChangeTimeStamp: Sun Oct 31 12:02:02 IST 2021
ActiveEnterTimestamp: Sun Oct 31 12:02:02 IST 2021
InactiveExitTimestamp: Sun Oct 31 12:02:02 IST 2021
ActiveExitTimestamp: 0
InactiveExitTimestamp: Sun Oct 31 12:02:02 IST 2021
Active: active (running) since Sun Oct 31 12:02:02 IST 2021
System status:
❯ pmctl status system
System Name: Zeus
Kernel: Linux (5.14.0-0.rc7.54.fc36.x86_64) #1 SMP Mon Aug 23 13:55:32 UTC 2021
Chassis: vm
Hardware Model: VMware Virtual Platform
Hardware Vendor: VMware, Inc.
Product UUID: 979e4d56b63718b18534e112e64cb18
Operating System: VMware Photon OS/Linux
Operating System Home URL: https://vmware.github.io/photon/
Systemd Version: v247.10-3.ph4
Architecture: x86-64
Virtualization: vmware
Network State: routable (carrier)
Network Online State: online
DNS: 172.16.130.2
Address: 172.16.130.132/24 on link ens33
172.16.130.131/24 on link ens33
fe80::3279:c56d:55f9:aed7/64 on link ens33
172.16.130.138/24 on link ens37
Gateway: 172.16.130.2 on link ens37
172.16.130.2 on link ens33
Uptime: Running Since (2 days, 3 hours, 8 minutes) Booted (Wed Dec 22 15:57:24 IST 2021) Users (9) Proc (284)
Memory: Total (13564788736) Used (13564788736) Free (589791232) Available (9723891712)