HOME ABOUT WEB GITHUB TOP BOTTOM PREV NEXT
Week 10 Assignments #3: Modules
- Read:
- Z910-SP0-MEMO.txt
- Z910-SP1-USER.txt
- Z910-SP2-ROOT.txt
- Z910-SP3-KERN.txt
- Assignment:
- (root) Write kernel log to file WEEK10-KERNEL-LOG.txt
- (root) Change owner file WEEK10-KERNEL-LOG.txt
- (user) COPY the result to SP_RESULT/W10/WEEK10-KERNEL-LOG.txt
tail -f /var/log/kern.log | grep --line-buffered ' ZCZC ' | tee WEEK10-KERNEL-LOG.txt
-
Change owner file “WEEK10-KERNEL-LOG.txt” and copy it to $HOME/SP_RESLT/W10/
-
Tainted Kernel Check (ROOT)
- BIT 12=1 (4096) means: ‘Externally-built (“out-of-tree”) module was loaded’
for i in $(seq 18); do echo $(($i-1)) $(($(cat /proc/sys/kernel/tainted)>>($i-1)&1));done
- Test script “h09-test.sh” is run by root. Change owner file “/tmp/WEEK$WEEK-MODULE-LOG.txt” and copy it to:
MODLOG="/tmp/WEEK10-MODULE-LOG.txt"
RESULT="$HOME/SP_RESULT/W10"
[ -d $RESULT/ ] || mkdir -pv $RESULT/
if [ -f $MODLOG ] ; then
cp -v $MODLOG $RESULT/
cd $RESULT/
ls -al
else
echo "No $MODLOG File!"
fi