Contents
Manage Network Agent from the command line
This section contains information on how to manage Network Agent using the command line on a client computer.
You can stop Network Agent and start it again using the command line on a client computer.
You can also connect a remote computer to Administration Server manually using the klmover utility and check the connection between the remote computer and Administration Server using the klnagchk utility.
Start/stop Network Agent on a remote computer
You can stop Network Agent and it start again on a client computer by using the command line.
Stop Network Agent
On the remote computer, launch the launchctl utility with the unload command from the command line.
Command syntax
sudo launchctl unload /Library/LaunchDaemons/com.kaspersky.klnagent.plist
Start Network Agent
On the remote computer, launch the launchctl utility with the load command from the command line.
Command syntax
sudo launchctl load /Library/LaunchDaemons/com.kaspersky.klnagent.plist
Important: Administrator rights are required to stop and start Network Agent.
Page topCheck the connection between a client computer and Administration Server manually. Klnagchk utility
Check the connection between a remote computer and Administration Server
After Network Agent has been installed, the klnagchk utility is located in the /Library/Application Support/Kaspersky Lab/klnagent/Binaries folder. Depending on the parameters that you specify, the klnagchk utility performs the following operations when run from the command line:
- Displays the settings specified for the connection between Network Agent installed on the remote computer and Administration Server, or saves them in a file.
- Saves Network Agent statistics (since the last startup of Network Agent) and utility execution results in a file, or displays this information on the screen.
- Tries to establish a connection between Network Agent and Administration Server.
- If the utility can't establish a connection, it sends an ICMP packet to check the status of the computer on which Administration Server is installed.
Before running the utility, go to /Library/Application Support/Kaspersky Lab/klnagent/Binaries in the command line.
Command syntax:
sudo ./klnagchk [-logfile <file name>] [-sp] [-savecert <path to certificate file>] [-restart]
Important: Administrator rights are required to run the utility.
Parameter descriptions
-logfile <file name>
– Save the settings of the connection between Network Agent and Administration Server and utility execution results in a file. If this parameter is not specified, the server connection settings, execution results, and error messages are displayed on the screen.
-sp
– Display the password for proxy server authentication on the screen or save it in a file. This parameter is used if Network Agent connects to Administration Server via a proxy server. By default, this parameter is not used.
-savecert <file name>
– Save the certificate for authentication on Administration Server in a specified file.
-restart
– Restart Network Agent after the utility finishes running.
Example: sudo ./klnagchk -logfile klnagchk.log -sp
|
Connect a remote computer to Administration Server manually. Klmover utility
Connect a remote computer to Administration Server
After Network Agent has been installed, the klmover utility is located in the /Library/Application Support/Kaspersky Lab/klnagent/Binaries folder. Depending on the parameters that you specify, the klmover utility performs the following operations when run from the command line:
- Connects Network Agent to Administration Server with the specified parameters.
- Saves utility execution results in a file or displays them on the screen.
Before running the utility, go to /Library/Application Support/Kaspersky Lab/klnagent/Binaries in the command line.
Command line syntax:
sudo ./klmover [-logfile <file name>] [-address <server address>] [-pn <port number>] [-ps <SSL port number>] [-nossl] [-cert <path to certificate file>] [-silent] [-dupfix]
Important: The administrator rights are required to run the utility.
Parameter descriptions
-logfile <file name>
– Save execution results in a file. If this parameter is not specified, execution results and error messages are displayed on the screen.
-address <server address>
– Address that Network Agent uses to connect to Administration Server. You can specify either the IP address or the DNS name of the server.
Note: You can also use the command with this parameter to change the address of the Administration Server to which remote computers are connected.
-pn <port number>
– Number of the port that will be used to establish an unencrypted connection to Administration Server. Port 14000 is used by default.
-ps <SSL port number>
– Number of the port that will be used to establish an encrypted connection to Administration Server via the SSL protocol. Port 13000 is used by default.
-nossl
– Use an unencrypted connection to Administration Server. If this parameter is not specified, Network Agent will establish a secure connection to Administration Server via the encrypted SSL protocol.
-cert <path to certificate file>
– Use the specified certificate file for authentication on a new Administration Server. If this parameter is not specified, Network Agent will receive a certificate at the first connection to Administration Server.
-silent
– Run the utility in silent mode.
-dupfix
– This parameter is used if Network Agent was installed in a way that differs from the methods described in the Administrator's Guide, for example, if it was recovered from a disk image with Network Agent installed. If automatic self-identification of Network Agent results in duplicate icons of the original computer and other computers in the Administration Console, try reconnecting the duplicate computers.
Note: When running the klmover utility, it is recommended to specify values for all parameters.
Example: sudo ./klmover -logfile klmover.log -address 192.0.2.12 -ps 13001 |
The remote computer that is connected to Administration Server via Network Agent is called a client computer.