SW-COLLECTOR(8)
π SW-COLLECTOR π
okay bestie, so you know that whole "what even is installed on this machine and when did it get there" saga? yeah. that's this. it's sw-collector, it lives in section 8 of the manual (the big-girl sysadmin section, we love her), and it ships with strongSwan. let's get into it π«Ά
β¨ NAME β¨
sw-collector β pulls software installation events out of the dpkg history log, no cap π
πΈ SYNOPSIS πΈ
sw-collector [--debug level] [--quiet] [--count event-count]
sw-collector [--debug level] [--quiet] [--installed|--removed]
--list|--unregistered
sw-collector [--debug level] [--quiet] [--installed|--removed] [--full]
--generate
sw-collector [--debug level] [--quiet] --migrate
sw-collector [--debug level] [--quiet] --check
sw-collector -h | --help
π¦ DESCRIPTION π¦
So here's the tea β: sw-collector goes digging through the apt history log and finds all the moments where a software package got installed, updated, or yeeted off the system. Then it takes those software events and tucks them safely into an SQLite database. πΎ
But wait, there's more β because just trusting the log alone would be it's giving chaos. So the history info it pulled gets merged and made consistent with the actual list of installed packages, which it grabs with dpkg-query. So the database matches reality, not just the receipts. iconic behaviour, honestly. π
π OPTIONS π
-h,--helpβ prints the usage info plus a lil short summary of all the commands you can run. your lil cheat sheet, bestie.-v,--debug levelβ sets the debug level. default is2.-q,--quietβ turns OFF debug output tostderr. shhh π€«-i,--installedβ applies the command to installed software packages only. just the ones that are still here.-r,--removedβ applies the command to removed software packages only. the ones that ghosted us π-f,--fullβ generates ISO 19770-2:2015 SWID tags with full file information. heads up: this is only possible for installed software packages, ok? don't try it on the removed ones.-l,--listβ lists every software package stored in the collector database, showing their installation status. a whole roster β¨-u,--unregisteredβ lists all the software packages that are sitting in the local collector database but have no SWID tags yet in a central collector database that you reach via a REST interface. basically: "who hasn't been registered yet π"-g,--generateβ generates ISO 19770-2:2015 SWID tags for all software packages chillin' in the local collector database that don't have SWID tags in a central collector database reachable via a REST interface. tag 'em up π-m,--migrateβ for migrating collector database versions. right now what it does is remove all architecture suffixes from dpkg package names. glow-up for your database.-C,--checkβ checks the integrity of the collector database against the actual list of installed packages obtained withdpkg-query. vibe check, but make it forensic π
π CONFIGURATION π
these parameters can be configured in strongswan.conf:
sw-collector {
database = sqlite:///etc/pts/collector.db
history = /var/log/apt/history.log
first_time = 2016-04-22T20:55:14Z
rest_api {
uri = https://admin-user:ietf99hackathon@tnc.strongswan.org/api/
timeout = 120
}
}
and the parameters of the swid_generator that gets used with the --generate command? those can be changed in the libimcv section of strongswan.conf:
libimcv {
swid_gen {
command = /usr/local/bin/swid_generator
tag_creator {
name = strongSwan Project
regid = strongswan.org
}
}
}
π FILES π
@PKGDATADIR@/templates/database/sw-collector/sw_collector_tables.sql
π§ SEE ALSO π§
and that's the whole page, bestie, no notes π
okay so final lil sign-off: this whole thing is version 6.0.7, dated 2017-08-25, and yeah the copyright vibe belongs to the strongSwan crew. periodt. π
β¨πΈ
π¦ where this page comes from
- fedora 43: strongswan 6.0.7-2.fc43 Β· GPL-2.0-or-later
- fedora 44: strongswan 6.0.7-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms