How to run cleanup script if root disk-space exceed 90%
99318
Created On 10/15/19 01:27 AM - Last Modified 06/08/20 03:15 AM
Question
How to run cleanup script if root disk-space exceed 90%?
Environment
- PAN-OS 8.1 and above.
- Any Palo Alto Firewall.
Answer
By default the cleanup script will only run when root directory exceed 95%.This script can also be made to run when the disk space exceeds 90% by using the following command.
debug software disk-usage cleanup deep threshold <90-100>
Here 90-100 define percentage threshold of size of system partition to kick off the cleanup.
Running this command will result potential loss of debuggability due to deletion of debug logs.
Example below:
PA-220> show system disk-space
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.8G 3.2G 386M 90% /
none 2.0G 60K 2.0G 1% /dev
/dev/mmcblk0p5 12G 2.8G 7.9G 27% /opt/pancfg
/dev/mmcblk0p6 3.8G 3.2G 386M 90% /opt/panrepo
tmpfs 2.0G 247M 1.8G 13% /dev/shm
cgroup_root 2.0G 0 2.0G 0% /cgroup
/dev/mmcblk0p8 4.6G 700M 3.7G 16% /opt/panlogs
/dev/loop0 111M 5.6M 100M 6% /opt/panlogs/wildfire/tmpfile
tmpfs 12M 0 12M 0% /opt/pancfg/mgmt/lcaas/ssl/private
PA-220> debug software disk-usage cleanup deep threshold 90
Done. root partition size 63% is below threshold
PA-220> show system disk-space
Filesystem Size Used Avail Use% Mounted on
/dev/root 3.8G 1.6G 2.0G 45% / <<
none 2.0G 60K 2.0G 1% /dev
/dev/mmcblk0p5 12G 2.8G 7.9G 27% /opt/pancfg
/dev/mmcblk0p6 3.8G 3.2G 386M 90% /opt/panrepo
tmpfs 2.0G 247M 1.8G 13% /dev/shm
cgroup_root 2.0G 0 2.0G 0% /cgroup
/dev/mmcblk0p8 4.6G 700M 3.7G 16% /opt/panlogs
/dev/loop0 111M 5.6M 100M 6% /opt/panlogs/wildfire/tmpfile
tmpfs 12M 0 12M 0% /opt/pancfg/mgmt/lcaas/ssl/private
Additional Information
What Important Information Should Customer Be Aware
How and when to clear disk space on a Palo Alto Network device.