BD_PGSQL_PURGE(8)

πŸ’… bd_pgsql_purge(8) β€” the bestie manual ✨

okay so this is bd_pgsql_purge, and it lives in section 8 of the System Manager's Manual. she's a summarizer script for bandwidthd in postgresql mode. no cap. 🫢


πŸŽ€ NAME πŸŽ€

bd_pgsql_purge β€” summarizer script for bandwidthd (postgresql mode)


✨ DESCRIPTION ✨

so like. this program generates the SQL code that should be run at certain intervals to summarize the data collected by bandwidthd (in postgresql mode) and purge the detailed records. that's her whole job and she eats every time. πŸ‘‘

but here's the thing bestie β€” the program itself only generates the SQL code. it does not run it. it does not touch your database. it just hands you the SQL like "here girl, do something with this." 😭

you need to feed it to your postgresql server yourself. the classic way is piping the output to the psql program:

bd_pgsql_purge | psql
πŸ’€ fr fr, if you just run this and stare at the terminal output expecting the database to be cleaned, nothing happens. YOU have to do the feeding. she's a generator, not a doer.

adding a crontab script that runs weekly and cleans up the database is recommended. lowkey the intended lifestyle tbh. 🌸


πŸ“ FILES πŸ“

  • /usr/sbin/bd_pgsql_purge β€” the script to generate sql code πŸ’–
  • /etc/cron.weekly/bandwidthd-pgsql β€” default schedule for bd_pgsql_purge πŸ•

πŸ‘€ SEE ALSO πŸ‘€

furter information available at the website: http://bandwidthd.sourceforge.net 🌈


🫢 AUTHOR 🫢

this manual page was written by Andreas Henriksson <andreas@fatal.se>, for the Debian GNU/Linux system. iconic of him honestly. πŸ’œ


and that's the whole page bestie!! this one came from the System Manager's Manual, dated 8 Dec 2007, and yeah β€” it's the BD_PGSQL_PURGE(8) page, go off. πŸ¦‹βœ¨