Hi Matthias I’ve come across a “spacecmd” report called “report_outofdatesystems” which may be of interest to you as it produces a very simple list of systems with the number of outstanding patches?
spacecmd {SSM:0}> report_outofdatesystems System Packages -------------------------- -------- server 1 9 server 2 2 server 3 590 server 4 592 spacecmd {SSM:0}> Regards Phil From: Philip Cookson (IT Services) Sent: 12 February 2019 15:27 To: 'spacewalk-list@redhat.com' <spacewalk-list@redhat.com> Subject: RE: [Spacewalk-list] List of patched/to patched systems by commandline Hi Matthias Have you looked at the standard Spacewalk reports or “spacecmd” command at all? The “spacewalk-report” tool outputs information in a CSV format. The related package needs to be installed from the Spacewalk repository: # yum -y install spacewalk-reports The man page for spacewalk-report is in the usual format and there is also an option "--list-fields-info" that is helpful: # spacewalk-report --list-fields See report descriptions below – the “system-currency” report might be useful for what you’re after? · channel-packages - Packages in channels · channels - Channel report · custom-info - Display system custom info · entitlements - Entitlement and channel list and usage · errata-channels - List of errata in channels · errata-list - Errata information based upon compliance checks against systems · errata-list-all - List of all erratas · errata-systems - Listing of each errata applicable to each affected system · inactive-systems - Inactive systems in Satellite · inventory - Inventory report · kickstartable-trees - List of kickstartable trees · packages-updates-all - List of packages that can be upgraded · packages-updates-newest - List of packages that can be upgraded · scap-scan - Results of OpenSCAP xccdf evaluation · scap-scan-results - Results of OpenSCAP xccdf evaluation · system-crash-count - Crash count for systems · system-crash-details - Crash details for systems · system-currency - System currency list · system-groups - System groups in Satellite · system-groups-keys - Activation keys for system groups · system-groups-systems - Systems in system groups · system-groups-users - System groups users report · system-history - System event history · system-history-channels - Channel event history · system-history-configuration - Configuration event history · system-history-entitlements - System entitlement event history · system-history-errata - Errata event history · system-history-kickstart - Kickstart event history · system-history-packages - Package event history · system-history-scap - OpenSCAP event history · system-packages-installed - Packages installed on systems · users - Users in the system · users-systems - Systems administered by individual users The output could be piped through awk to get just the columns of info you’re interested in perhaps - see example command below: # spacewalk-report inventory | awk -F"," '{print $4, $3, $8}' > inventory.csv The “spacecmd” tool is also available from the Spacewalk repository and can be installed on a system other than the Spacewalk server to execute reporting queries and other commands remotely. Regards Phil From: spacewalk-list-boun...@redhat.com<mailto:spacewalk-list-boun...@redhat.com> <spacewalk-list-boun...@redhat.com<mailto:spacewalk-list-boun...@redhat.com>> On Behalf Of mgru...@metzler.com<mailto:mgru...@metzler.com> Sent: 12 February 2019 14:56 To: spacewalk-list@redhat.com<mailto:spacewalk-list@redhat.com> Subject: [Spacewalk-list] List of patched/to patched systems by commandline Hi! I am seeking for a way to determine via commandline or SQL-select, which systems are patched (no patches to apply) and which ones needed to be patched. I have used system_listerrata with a SSM, but the output is. well a little bit verbose, the Hostname would be enough Does anyone have some hint or trick for me, to get that done? cheers Matthias ------------------------------------------------------------------------------------ METZLER Informationstechnologie Matthias Gruber IT-Infrastruktur & -Betrieb B. Metzler seel. Sohn & Co. Kommanditgesellschaft auf Aktien Untermainanlage 1 60329 Frankfurt am Main Telefon (0 69) 21 04 - 43 30 Telefax (0 69) 21 04 - 40 40 mgru...@metzler.com<mailto:mgru...@metzler.com> www.metzler.com Persönlich haftende Gesellschafter: Harald Illy, Michael Klaus, Friedrich von Metzler, Emmerich Müller, Gerhard Wiesheu Vorsitzender des Aufsichtsrats: Dr. Christoph Schücking Sitz der Gesellschaft: Frankfurt am Main, Handelsregister-Nr. HRB 27 515 Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfänger sein, so bitten wir Sie höflich, dies unverzüglich dem Absender mitzuteilen und die Nachricht zu löschen. Es ist unzulässig, die Nachricht unbefugt weiterzuleiten oder zu kopieren. Da wir nicht die Echtheit oder Vollständigkeit der in dieser Nachricht enthaltenen Informationen garantieren oder zusichern können, sind die vorstehenden Ausführungen rechtlich nicht bindend. Eine Haftung hierfür wird ausgeschlossen. This message is confidential. If you are not the intended recipient, we kindly ask you to inform the sender and delete the information. Any unauthorised dissemination or copying hereof is prohibited. As we cannot guarantee or assure the genuineness or completeness of the information contained in this message, the statements set forth above are not legally binding. Accordingly we cannot accept any liability for their contents.
_______________________________________________ Spacewalk-list mailing list Spacewalk-list@redhat.com https://www.redhat.com/mailman/listinfo/spacewalk-list