This file is indexed.

/usr/lib/fai/task_sysinfo is in fai-nfsroot 5.3.6ubuntu1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
#! /bin/bash

# display some information about the system and save it to the logserver


# first show some hardware info
echo Showing system information.

# too much details [ -x "$(which dmidecode)" ] && dmidecode
cd /sys/class/dmi/id
grep . {board_,bios_,product_}* 2>/dev/null| sed -e 's/:/: /'| egrep -iv '123456789|To Be Filled|: Not |N/A|:[[:blank:]]+$'
cd - >/dev/null

if [ -x "$(which lshw)" ]; then
    lshwtmp=$(mktemp)
    lshw -short -quiet -C system,memory,processor,display,storage,disk | tee $lshwtmp
    echo
    grep processor $lshwtmp| sed -e 's/[^ ]*//' | uniq -c | perl -pe 's/\s+(\d+)\s+(.+)/$1 $2/;'
    rm $lshwtmp
fi

echo -n "Counting all CPU cores: "
grep "model name" /proc/cpuinfo | sort | uniq -c | sed -e 's/model name.*://' -e 's/(R)//g' -e 's/(TM)//g' -e 's/^[[:blank:]]\+//'

echo "NUMA configuration:"
numactl -H

echo
if [ -x "$(which hwinfo)" ]; then
    hwinfo --short --cpu --sys
    hwinfo --short --smp
    hwinfo --short --bios
    hwinfo --short --storage-ctrl --netcard --framebuffer --gfxcard
    hwinfo --short --disk --cdrom --network
    hwinfo --short --sound --wlan
fi

echo
# print info about audio device
lspci | grep -i audio
[ -f /proc/asound/card0/codec#0 ] && grep Codec /proc/asound/card*/codec#*

echo
# show network device parameters of devies which are UP
devices=$(ip link show up | grep "^[1-9$].*LOWER_UP" | cut -d : -f 2 | cut -d ' ' -f 2 | grep -v "^lo" | sort | uniq| tr '\n' ' ')
for dev in $devices; do
    [ $dev = lo ] && continue
    ip addr show up $dev
done

echo '=================================================='
echo "Now more detailed information"
echo '=================================================='

lspci
[ -x "$(which sfdisk)" ] && sfdisk -d

#[ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi

# start software raid
/usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
/etc/init.d/mdadm-raid start
/etc/init.d/lvm2 start

for device in /dev/sd?; do
    [ -b "$device" ] || continue # make sure device exists and is valid block device
    [ `stat -c %G $device` = "disk" ] || continue
    hdparm -I $device | egrep -v '^$' | head -5 | sed -e 's/^[[:blank:]]*//'
done

# pretty print disks by id and device names
find /dev/disk/by-id ! -type d -printf "%-40f\t->  %l\n" | grep -v part | sort -k3 | awk -F'->' '{print $2 ":  " $1}' | sed -e 's#../##g'

echo
cat /proc/partitions

[ -x "$(which lsblk)" ] && lsblk -i
[ -x "$(which blkid)" ] && blkid

# very detailed
for disk in $disklist; do
    smartctl -i /dev/$disk
    hdparm -iv /dev/$disk
    fdisk -lu /dev/$disk
    parted -s /dev/$disk print
    LC_ALL=C file -s /dev/$disk?* | grep -v ": empty"
done

fdisk -lu

dmsetup ls

# show lvm information
pvs;vgs;lvs

btrfs fi show

fai-mount-disk -f
[ -f $target/etc/fstab ] && cp -p $target/etc/fstab $LOGDIR

df -PTh | egrep ':|^/|^Filesystem'
# - - - - - - - - - - -
save_dmesg
fai-savelog -r