A recent study by IDC InfoBrief identified Linux as the only endpoint operating system (OS) growing at a global level. Its use is accelerating due to increased cloud spending, the proliferation of IoT, and its open-source nature and adoption by large players in the OS market.
Being high-performance, Linux devices are often managed separately from the rest of the IT infrastructure on cron. This approach leads to a lack of centralized device management.
Your Linux computers and their users are not connected to other devices — Windows and Macs — in your organization. It also means restricted access and less control by IT Admins over the Linux devices. Reporting on Linux-based assets becomes a challenge.
AssetSonar offers a pre-configured Agent that you can install in your Linux devices for centralized device management. It gives you the ability to manage and report on the configuration, custody, and maintenance status of your Linux devices from a single space.
In this article, we outline how you can install the AssetSonar Agent in your Linux devices and keep tabs on their use across the organization.
- Before you begin
- Installing the Linux Agent
- Syncing data
- Uninstalling the Linux Agent
1. Before you begin
You will need the following to successfully install and run the AssetSonar Agent on your Linux devices:
- An active AssetSonar (subscription/trial) account. If you don’t have a subscription or trial account, register here.
- A Debian/RHEL-based Linux PC with versions including but not limited to the following: Ubuntu 18.04, Ubuntu 20.04, Kali 2020.1, and now the CentOS 8.
- The AssetSonar Agent package. This consists of a tar.gz file and a bash script “install.sh” that installs the tar.gz file. You can get it from us at email@example.com.
- The AssetSonar Agent tag to feed into the terminal for the installation script.
Note: If you want to install the Agent for other versions of the Linux OS, send us an email at firstname.lastname@example.org. We’ll have a pre-configured Agent ready for you.
For a seamless installation process, it is recommended that you restart your PC before installing the AssetSonar Agent.
2. Installing the Linux Agent
Let’s begin with installing the Agent on your Linux device. Follow these steps:
- Download the AssetSonar Agent package you just got from us on your computer’s desktop. It contains the ‘tar.gz’ file and the installation script as shown:
2. Open your AssetSonar account to retrieve the Agent tag from Settings → Company Settings → ITAM Discovery Agent.
3. Now, open the terminal of your Linux device and navigate to the ‘linux_agent’ package by typing ‘cd ~/Desktop/linux_agent/’. This will open up the folder and its contents in the terminal.
4. Make the installation file executable by typing in the command ‘chmod +x install.sh’.
5. Now, run the command ‘sudo ./install.sh <package_path> <agent_tag>’ to open the installation script. Copy the Agent tag from Step 2. Paste the two values in the order shown, and hit ‘enter’.
This will install the AssetSonar Agent on your Linux device.
Note: Remember to prepend ‘sudo’ to the command you want to run. This gives you the root privilege to execute the command.
Warning: The Agent is installed in the directory ‘opt/ocsinventory’ and will delete all files in the directory if it already exists. It will also remove any cron jobs for OCS inventory in the crontab.
3. Syncing data
The Agent will now scan the Linux device for IT information and sync the data to your AssetSonar account over an https request. You can go to the ‘Company Settings’ page in your account to view this.
Once the sync is complete, you can head to the Asset Details page to view the discovered Linux device. Alternatively, you can also click on the message shown below.
The system typically schedules automatic sync to run after every five hours using a cron job. However, you can also manually update the details of your Linux devices by clicking on ‘Sync Now’.
What happens when a Linux device misses syncing?
Admins receive an email alert for missing syncs. A common use case is of IT Assets that were inactive in the last two days.
The system sends an alert that informs the admin(s) and lists down the Linux devices that were not synced in the past two days.
4. Uninstalling the Linux Agent
If you wish to install an updated version of the AssetSonar Agent, you can uninstall the previous version and install the newer one.
Below, we outline how to uninstall the AssetSonar Agent from your Linux-based computer.
- Email us at email@example.com to get the script for uninstallation.
- Download and save the uninstallation script in the folder containing the AssetSonar Agent package.
- Follow steps 3 to 5 from Section 2. However, note that the uninstallation script ‘uninstall.sh’ will replace the installation script ‘install.sh’ from Section 2. You do not need to specify the <package_path> and <agent_tag> here.
This shall uninstall the AssetSonar Agent from your Linux device.
You are now ready to install updated or newly requested pre-configured versions of the AssetSonar Agent.
If you encounter any issues with our Agent, access the log files containing the Agent from your device. These log files list all the issues with the Agent, should they occur.
You can follow this pathway to access the log files: Terminal → Var → Log → ocs_agent.log.
Email the log files to firstname.lastname@example.org and we’ll take care of the rest for you.
Have Feedback About our IT Asset Management Software?
For more assistance, drop us an email at email@example.com. Visit our blog for more detailed support posts.