0xtools icon indicating copy to clipboard operation
0xtools copied to clipboard

Use a /tmp file instead of RAM if duration exceeds 60 seconds

Open rebhi opened this issue 6 months ago • 0 comments

This PR resolves https://github.com/tanelpoder/0xtools/issues/48

Changes made: Updated to switch the SQLite database to a file (/tmp/psn_samples_${pid}.db) if the duration (args.sample_seconds) exceeds 60 seconds. Defined a cleanup function to remove the temporary database file if it was created. Register the cleanup function to be called on script exit or interruption using atexit if samples are not being persisted.

rebhi avatar Aug 06 '24 21:08 rebhi