pax_global_header00006660000000000000000000000064151521301440014506gustar00rootroot0000000000000052 comment=be7dc4d46e3e87947ef8ddc92224ede57a1eb40b dell-sassist-0454db5/000077500000000000000000000000001515213014400144465ustar00rootroot00000000000000dell-sassist-0454db5/.travis.yml000066400000000000000000000020221515213014400165530ustar00rootroot00000000000000language: c sudo: required dist: trusty services: - docker env: - OS=centos - OS=opensuse install: - ./pkg/build-dockerfile.sh $OS script: - docker run -e CI=true -t -v `pwd`/dist:/build/dist sassist-$OS deploy: provider: releases api_key: secure: "tQqO/ZebjkaLz8uImL5vOIkNvpaRnixXJKMPsSXBj7zTs19ENpZ4Sbz/3RUarRwCsoWRxoMmN/GAkpQ1easty1XRtqF1J04XlERpL+5EzvZ1ISjQ7VAGarBdUaAWSr13+ESWJWkdr+hpBv3M0PNPWCaynqzzrVS9PoEjuKtf2Jy0t5xmEPy68+7v77qUBvJuqjX+Kh1oR2nyS8OfG46RKrUHC/C7vFWMGOpcoVQyAOLZigpKeO7IapKMGfjEE5O353hsB4c4K2bfwPBe6n1UPAiWVpIW4dU+pNPLph7esBjpRjbdumJQl0b3Pq3inksuq7zyyqlt+fiU/7aKEEuJbSPWYtpaGtsgyovRMCa8RfN7JnR1GPmHUDA+1lpmiQm37IqBjFZbRsJqRSwhmdB/gRh8bl6dU3OQOPUYVyGFq6xzSF57p916pmKmdN6cWUJDBHnks0PdjBgTgUIsM+ZV/Fd28bslhpP01DzzeCWVqIPzaRFBD8WzYnmHqY9cUhVQ8X6ZO+BagkH58p85FL+WMvOWx3PV7I0PYgr1a/KWioo4kYDAT9asmXuw9zI1rWV/K8cLVaPFvDzCe9ZKN43NXA66lod/pQxpKiPxbEHQaWqpr8WIHIziA/9FO1zuNBvz0ZE7R5Bd7UryoOGErruNfv00qJxi95V3bWt4JsR0nG4=" file_glob: true file: dist/* skip_cleanup: true on: tags: true repo: dell/sassist dell-sassist-0454db5/COPYING000066400000000000000000000020471515213014400155040ustar00rootroot00000000000000sassist Copyright (C) 2017 Dell, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. dell-sassist-0454db5/Makefile000066400000000000000000000006461515213014400161140ustar00rootroot00000000000000VERSION := $(shell cat VERSION) SPECFILE = pkg/sassist.spec all: rpm rpm: srpm rpmbuild --define='_topdir ${PWD}' -ba --nodeps ${SPECFILE} srpm: tarball rpmbuild --define='_topdir ${PWD}' -ts ./SOURCES/sassist-${VERSION}.tar.gz tarball: mkdir -p ./SOURCES git archive --format=tar.gz --prefix=sassist-${VERSION}/ -o ./SOURCES/sassist-${VERSION}.tar.gz HEAD clean: rm -rf SOURCES BUILD BUILDROOT RPMS SRPMS SPECS dell-sassist-0454db5/README.md000066400000000000000000000061461515213014400157340ustar00rootroot00000000000000This is 'sassist', Dell SupportAssist log collector agent for Linux. ## What is 'sassist'? Dell SupportAssist embedded in Dell iDRAC helps with troubleshooting/debugging issues with Dell PowerEdge Server hardware/OS. 'sassist' is an agent that runs on the Linux Operating System to work with Dell iDRAC enabling log and configuration collection. It uses native log/configuration collection tools like [sos](https://github.com/sosreport/sos) and [supportconfig](https://github.com/openSUSE/supportutils) available in popular Linux distributions. 'sassist' requires Dell [iDRAC 9](https://www.dell.com/support/article/us/en/19/sln308699/idrac-9-versions-and-release-notes) or later. ## Working - User initiates SupportAssist Collection from Dell iDRAC through any of the available interfaces (Web UI, wsman, redfish, racadm) - 'sassist' collects system logs/configuration and packages it for use by Dell iDRAC. - Dell iDRAC aggregates OS/firmware/hardware logs and makes it available via the requested method. ## Download - 'sassist' is available in Fedora 29, openSUSE Leap 15.4 and Tumbleweed. It can be installed from the default repository. On SUSE Linux Enterprise Server 15 SP4 it is available via [SUSE PackageHub](https://packagehub.suse.com/packages/sassist/). - Pre-built packages for RHEL (CentOS, Fedora) and SLES (OpenSUSE) based distributions are available [here](https://github.com/dell/sassist/releases) ## Build ### rpm: - Download the [tarball](https://github.com/dell/sassist/releases/latest). - `tar xf .tar.gz` - `make` ### deb: - TODO ## Installation: - Install package - `$ sudo yum install sassist-.rpm` OR - `$ sudo zypper in sassist-.rpm` - Start sassist - `$ sudo systemctl enable --now sassist` ## Usage: ### Create a SupportAssist collection from Dell racadm cli: - `racadm supportassist accepteula` - `racadm supportassist collect -t sysinfo,osAppAll -f ` - Report will be saved in REPORT_LOCATION - More details [here](https://www.dell.com/support/manuals/us/en/04/idrac9-lifecycle-controller-v3.00.00.00/idrac_3.00.00.00_racadm/supportassist?guid=guid-c7de9746-8581-4994-8dfe-1804237a10e3&lang=en-us) ### Create a SupportAssist collection from Dell iDRAC Web UI: - Navigate to Maintenance -> SupportAssist - At the “SupportAssist Registration” screen, click "Cancel" (The support to automatically/periodically collect and upload logs to Dell Support sites is still not available with ‘sassist’. Until then, the log collection can only be initiated manually). - Click “Start a Collection” - Check “OS and Application Data” and click “Collect” - Accept EULA and click “Continue” - Monitor Progress. The process would take a couple of minutes. - On completion, click “Ok” and save the “zip” archive. This can be used for analysis/debugging. - More details [here](https://www.dell.com/support/article/dm/en/dmdhs1/sln306670/how-to-manually-create-the-supportassist-collection-with-idrac-9-?lang=en) ## Notes - Do not run SupportAssist Collection while updating system firmware components with [Dell DSU](https://linux.dell.com/repo/hardware/dsu/). dell-sassist-0454db5/VERSION000066400000000000000000000000061515213014400155120ustar00rootroot000000000000000.8.8 dell-sassist-0454db5/pkg/000077500000000000000000000000001515213014400152275ustar00rootroot00000000000000dell-sassist-0454db5/pkg/build-dockerfile.sh000077500000000000000000000001701515213014400207700ustar00rootroot00000000000000#!/bin/bash cur_dir=$(cd $(dirname $0); pwd) docker build -f $cur_dir/dockerfiles/Dockerfile.${1} -t sassist-${1} -- . dell-sassist-0454db5/pkg/dockerfiles/000077500000000000000000000000001515213014400175215ustar00rootroot00000000000000dell-sassist-0454db5/pkg/dockerfiles/Dockerfile.centos000066400000000000000000000003431515213014400230050ustar00rootroot00000000000000FROM centos VOLUME /output ENV OUTPUT_DIR /build/dist ENV BUILD_DIR /build RUN yum install -y \ rpm-build \ make \ bash \ && yum clean all WORKDIR $BUILD_DIR COPY . . CMD ["./pkg/dockerfiles/rpm-entrypoint.sh"] dell-sassist-0454db5/pkg/dockerfiles/Dockerfile.opensuse000066400000000000000000000003521515213014400233530ustar00rootroot00000000000000FROM opensuse/leap VOLUME /output ENV OUTPUT_DIR /build/dist ENV BUILD_DIR /build RUN zypper in -y \ rpm-build \ make \ bash \ && zypper clean -a WORKDIR $BUILD_DIR COPY . . CMD ["./pkg/dockerfiles/rpm-entrypoint.sh"] dell-sassist-0454db5/pkg/dockerfiles/rpm-entrypoint.sh000077500000000000000000000001721515213014400230670ustar00rootroot00000000000000#!/bin/sh ./pkg/mk-rel-rpm.sh cp $BUILD_DIR/_builddir/noarch/*.rpm $OUTPUT_DIR cp $BUILD_DIR/_builddir/*.rpm $OUTPUT_DIR dell-sassist-0454db5/pkg/mk-rel-rpm.sh000077500000000000000000000011161515213014400175500ustar00rootroot00000000000000#!/bin/sh # vim:et:ai:ts=4:sw=4:filetype=sh:tw=0: set -x cur_dir=$(cd $(dirname $0); pwd) cd $cur_dir/../ VERSION=$(cat VERSION) cp -a ../build ../sassist-$VERSION tar zcf sassist-$VERSION.tar.gz ../sassist-$VERSION umask 002 set -e chmod -R +w _builddir ||: rm -rf _builddir mkdir _builddir pushd _builddir TOPDIR="/build/_builddir" rpmbuild --define "_topdir $TOPDIR" \ --define "_builddir $TOPDIR" \ --define "_sourcedir $TOPDIR/../" \ --define "_specdir $TOPDIR/pkg" \ --define "_srcrpmdir $TOPDIR" \ --define "_rpmdir $TOPDIR" \ -ba --nodeps $TOPDIR/../pkg/sassist.spec dell-sassist-0454db5/pkg/sassist.spec000066400000000000000000000047341515213014400176040ustar00rootroot00000000000000Name: sassist Version: 0.8.8 Release: 1%{?dist} Summary: Dell SupportAssist log collector License: MIT URL: http://www.dell.com/en-us/work/learn/supportassist Source0: https://github.com/dell/sassist/archive/%{version}/%{name}-%{version}.tar.gz BuildRequires: systemd %if 0%{?suse_version} Requires: supportutils %else Requires: sos %endif Requires: freeipmi Requires: zip BuildArch: noarch %{?systemd_requires} %description Dell SupportAssist log collector for Linux. %prep %setup -q -n %{name}-%{version} %build %install mkdir -p %{buildroot}%{_libexecdir} mkdir -p %{buildroot}%{_unitdir} install -p -m755 src/sassist.sh %{buildroot}%{_libexecdir} install -p -m644 src/systemd/sassist.service %{buildroot}%{_unitdir} install -p -m644 src/systemd/sassist-collect.service %{buildroot}%{_unitdir} install -p -m644 src/systemd/run-media-iDRAC_NATOSC.mount %{buildroot}%{_unitdir} %files %license COPYING %{_libexecdir}/sassist.sh %{_unitdir}/sassist.service %{_unitdir}/sassist-collect.service %{_unitdir}/run-media-iDRAC_NATOSC.mount %post %systemd_post sassist.service %preun %systemd_preun sassist.service %postun %systemd_postun_with_restart sassist.service %changelog * Web Mar 04 2025 Charles Rose - 0.8.8-1 - sos, USB storage, move sassist.sh to libexec * Thu May 29 2025 Charles Rose - 0.8.7-1 - Update sos cli * Tue Mar 17 2020 Charles Rose - 0.8.6-1 - Fix socket files breaking zip file creation. - Use labels to mount USB device. * Thu Nov 01 2018 Charles Rose - 0.8.5-1 - Retain all content in zip file. Created Makefile. * Fri Oct 19 2018 Charles Rose - 0.8.4-1 - PrivateTmp, better error handling, sos plugin changes * Fri Aug 24 2018 Charles Rose - 0.8.3-1 - move mount point, enable all sos plugins, some cleanup * Mon Jun 18 2018 Charles Rose - 0.8.2-1 - incorporate spec file suggestions from Robert-André Mauchin * Thu Jun 14 2018 Charles Rose - 0.8.2 - guess paths for log collectors. fix error handling. * Thu Jun 14 2018 Charles Rose - 0.8.1 - add dependency on zip. fix temp dir creation bug * Mon Apr 02 2018 Charles Rose - 0.8.0 - add support for supportconfig * Mon Apr 02 2018 Charles Rose - 0.7.1 - support multi-distro * Mon Aug 28 2017 Charles Rose - 0.7.0-1 - first RPM release dell-sassist-0454db5/src/000077500000000000000000000000001515213014400152355ustar00rootroot00000000000000dell-sassist-0454db5/src/sassist.sh000077500000000000000000000067571515213014400173040ustar00rootroot00000000000000#!/bin/sh # # sassist.sh # # Export sosreport to Dell PowerEdge Server iDRAC for out-of-band access. # # Usage: # Invoked by sassist.service when SupportAssist USB block device # is attached. # # # Copyright 2017 Charles Rose, Dell Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # User configurable options #SOS_PLUGINS="console,fwupd,grub2,iscsi,tuned" SOS_PROFILES="hardware,network,storage" SCONFIG_PLUGINS="BOOT,BTRFS,CRASH,DISK,IB,ISCSI,LVM,MEM,MOD,MPIO,NET,SRAID,SYSCONFIG,SYSFS,UDEV,X" SOSREPORT="" # path is distro specific SUPPORTCONFIG="/sbin/supportconfig" #-------------------------------------------------------------- ipmi() { RET=$(/usr/sbin/ipmi-raw 0 30 a8 $@ | awk '{print $4}') if [ $? -eq 0 -a "$RET" -ne 1 ]; then return 0 fi return 1 } sa_can_filter="ipmi 0 1 3 0 0" sa_cannot_filter="ipmi 0 1 1 0 0" sa_started="ipmi 1 0 0" sa_end_full="ipmi 2 0 3" sa_end_partial="ipmi 2 1 3" sa_do_close="ipmi 2 2 0" sa_do_fail="ipmi 2 3 0" can_do_sassist() { $sa_cannot_filter } # Run sosreport and zip results do_sosreport() { $SOSREPORT report --batch -p ${SOS_PROFILES}\ --tmp-dir ${TMP_DIR} --build --quiet \ --name ${SVCTAG} || return 1 find ${TMP_DIR} -type s -exec rm -f '{}' \; $(cd ${TMP_DIR}/sosreport-* && zip -y -q -r ${OUTFILE_F} . ) } # Run supportconfig and zip results do_supportconfig() { $SUPPORTCONFIG -Q -d -k -t ${TMP_DIR} \ -i ${SCONFIG_PLUGINS} -B ${SVCTAG} || return 1 $(cd ${TMP_DIR}/*_${SVCTAG} && zip -q -r ${OUTFILE_F} . ) } do_report() { TMP_DIR=$(mktemp -d) SVCTAG=$(cat /sys/devices/virtual/dmi/id/product_serial) OUTFILE_F="${TMP_DIR}/OSC-FR-Report-${SVCTAG}.zip" if $(findmnt | grep -q "$MEDIA_DIR") && ! $sa_started; then RETVAL=3 do_stop fi if SOSREPORT="$(command -v sos 2>/dev/null)"; then do_sosreport >/dev/null 2>&1 elif [ -x "$SUPPORTCONFIG" ]; then do_supportconfig >/dev/null 2>&1 else RETVAL=5 do_stop fi if [ $? -ne 0 ]; then RETVAL=6 do_stop fi SHA_F=$(sha256sum ${OUTFILE_F}| cut -d' ' -f1| sed 's/.\{2\}/& /g') cp -f ${TMP_DIR}/OSC-*zip ${MEDIA_DIR}/ >/dev/null 2>&1 umount -r ${MEDIA_DIR} if [ $? -ne 0 ]; then RETVAL=1 do_stop fi # Close connection with checksum $sa_end_full "${SHA_F}" if [ $? -ne 0 ]; then RETVAL=1 fi do_stop } do_stop() { if [ $RETVAL -eq 0 ]; then $sa_do_close else $sa_do_fail fi rm -rf ${TMP_DIR} exit $RETVAL } # Main RETVAL=0 case $1 in enable) can_do_sassist ;; start) do_report ;; stop) do_stop ;; *) printf "Usage: %s \n" $0 exit 0 ;; esac dell-sassist-0454db5/src/systemd/000077500000000000000000000000001515213014400167255ustar00rootroot00000000000000dell-sassist-0454db5/src/systemd/run-media-iDRAC_NATOSC.mount000066400000000000000000000006511515213014400236230ustar00rootroot00000000000000[Unit] Description=Dell SupportAssist Device Documentation=http://www.dell.com/en-us/work/learn/supportassist After=dev-disk-by\x2dlabel-NATOSC.device BindsTo=sassist-collect.service ConditionPathExistsGlob=/dev/disk/by-id/usb-*_NATOSC_*-0:0* RefuseManualStart=true [Mount] What=/dev/disk/by-label/NATOSC Where=/run/media/iDRAC_NATOSC Type=vfat Options=noexec,rw,sync [Install] WantedBy=dev-disk-by\x2dlabel-NATOSC.device dell-sassist-0454db5/src/systemd/sassist-collect.service000066400000000000000000000010541515213014400234230ustar00rootroot00000000000000[Unit] Description=Dell SupportAssist Collector Documentation=http://www.dell.com/en-us/work/learn/supportassist ConditionFileIsExecutable=/usr/sbin/ipmi-raw ConditionPathExistsGlob=/dev/ipmi* ConditionPathIsMountPoint=/run/media/iDRAC_NATOSC ConditionPathExistsGlob=/dev/disk/by-id/usb-*_NATOSC_*-0:0 RequiresMountsFor=/run/media/iDRAC_NATOSC RefuseManualStart=true [Service] Type=forking TimeoutStartSec=300 PrivateTmp=yes Environment=MEDIA_DIR=/run/media/iDRAC_NATOSC ExecStart=/usr/libexec/sassist.sh start ExecStopPost=/usr/libexec/sassist.sh stop dell-sassist-0454db5/src/systemd/sassist.service000066400000000000000000000005101515213014400217740ustar00rootroot00000000000000[Unit] Description=Enable Dell SupportAssist Documentation=http://www.dell.com/en-us/work/learn/supportassist ConditionFileIsExecutable=/usr/sbin/ipmi-raw ConditionPathExistsGlob=/dev/ipmi* [Service] Type=oneshot ExecStart=/usr/libexec/sassist.sh enable [Install] WantedBy=multi-user.target Also=run-media-iDRAC_NATOSC.mount