Showing posts from July, 2018

Cleaning up Oracle Recycle Bin

It is a good idea to keep tabs on the recycle bin in your Oracle database, especially after PeopleSoft upgrades. This info is in the dba_recyclebin view.

To check the size and number of objects
select count(*), sum(space)/1024/1024 AS "Size in MB" from dba_recyclebin;
To empty it purge dba_recyclebin

Monitoring Diskspace Usage on Linux

While I would always advocate to monitor OS metrics like disk space usage with an agent (i.e. Enterprise Manager/Zabbix/Prometheus) sometimes, that's not always an option. For a recent edge case I needed to drop in a crontab script and wanted something dynamic (no hard coding) and informative. Here's what I came up with that may be useful for others.

The output will look something like this:

Running low on space "/dev/sda1 (85%)" on as on Tue Jul  3 12:54:39 EDT 2018.  It is mounted at /u01.

To find large directories in the mount use the disk usage command, i.e. - du -ax /u01 | sort -n -r | head -n 10
  **This email was generated from a script run on**