cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The AppDynamics Community is Migrating this Friday, February 28th.


At 6pm PST, the AppDynamics Community will go into read-only mode and after migration is complete, you will be redirected to community.splunk.com.
Read more here


Abhi.Bajaj
AppDynamics Team

How to Redirect Smart Agent Temporary Files to Avoid /tmp Space Limitations on Linux

Installing any APM or Machine agent with Smart Agent on your Linux box will use /tmp directory to copy agent binaries before moving them to the intended directory.

The problem

You can get an error like below:

 

error message = Error extracting Machine Agent in staging: reading file in zip archive: /tmp/.staging/machine-agent/jre/lib/modules: writing file: write /tmp/.staging/machine-agent/jre/lib/modules: no space left on device
Error creating Machine Agent service: error installing service: error moving service file to destination: rename /tmp/.staging/appdynamics-machine-agent.service /etc/systemd/system/appdynamics-machine-agent.service: invalid cross-device link

 

These errors are caused due to less space in /tmp folder or /tmp directory mounted on an external device.

How to fix it

You need to have Smart Agent use any other directory on our host then tmp.

To do this:

  • Go to <Smart-Agent-Home-Directory>, In my case the directory is /opt/appdynamics/appdsmartagent
  • Commands in order:
    cd /opt/appdynamics/appdsmartagent
    ./smartagentctl stop
    export TMPDIR=/opt/appdynamics
    ./smartagentctl start

Now in your logs, you will see

 

{"severityText":"INFO","timestamp":"2024-10-04T16:30:29.692Z","name":"native","caller":"machine/task_helper.go:48","body":"downloaded file to ","downloaded file":"/opt/appdynamics/.staging/download/machineagent-bundle-64bit-linux-24.9.0.4408.zip"}
{"severityText":"INFO","timestamp":"2024-10-04T16:30:29.692Z","name":"native","caller":"machine/task_helper.go:161","body":"Extracting zip","package.name":"8a5e85401b3a01ac5dadd6394c235dbf032ffa04;MACHINE_AGENT","src path":"/opt/appdynamics/.staging/download/machineagent-bundle-64bit-linux-24.9.0.4408.zip","dest path":"/opt/appdynamics/.staging/machine-agent"}

 

This means, Smart Agent is now copying everything in /opt/appdynamics directory.

 

Version history
Last update:
‎11-22-2024 10:47 AM
Updated by:
Ask the Experts Session: Hybrid Application Monitoring Deployment

Join us on Feb 26 to explore Splunk AppDynamics deployment strategies, SaaS models, agent rollout plans, and expert best practices.


Register Now

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here