Example of Launching a multiple thread of tails to trace the execution :

 

 

>cat taillog.sh
#!/bin/bash

RootEnv=/export/home/scbhktest
Selector=$RootEnv/selv5
Valdibus=$RootEnv/valdibus
scpipe_selector_p3=$RootEnv/scpipe_selector_p3
scpipe_p3_VB=$RootEnv/scpipe_p3_VB
SLE=$RootEnv/slev5
P3=$RootEnv/p3
StreamFIX=$RootEnv/StreamFIX
Glts=$RootEnv/glts
NbLinesBefore=1

Result=$RootEnv/result/result_`date +"%Y%m%d_%Hh%Mm%Ss"`_$1
mkdir -p $Result

tail -f --lines=$NbLinesBefore $Selector/log/selv5_`date +"%Y%m%d"`.log                       > $Result/selv5_`date +"%Y%m%d"`.log            &
pid1=$!
tail -f --lines=$NbLinesBefore $Valdibus/log/http-hogan.`date +"%Y-%m-%d"`.log          > $Result/http-hogan.`date +"%Y-%m-%d"`.log  &
pid2=$!
tail -f --lines=$NbLinesBefore $Valdibus/log/sel-sel-ext.`date +"%Y-%m-%d"`.log              > $Result/sel-sel-ext.`date +"%Y-%m-%d"`.log    &
pid3=$!
tail -f --lines=$NbLinesBefore $Valdibus/log/sel-sel-int.`date +"%Y-%m-%d"`.log              > $Result/sel-sel-int.`date +"%Y-%m-%d"`.log    &
pid4=$!
tail -f --lines=$NbLinesBefore $Valdibus/log/jms-sel_ost.`date +"%Y-%m-%d"`.log                > $Result/jms-sel_ost.`date +"%Y-%m-%d"`.log      &
pid5=$!
tail -f --lines=$NbLinesBefore $Valdibus/log/valdi-bus.`date +"%Y-%m-%d"`.log                > $Result/valdi-bus.`date +"%Y-%m-%d"`.log      &
pid6=$!
tail -f --lines=$NbLinesBefore $SLE/log/P10_`date +"%Y%m%d"`.log    > $Result/P10_`date +"%Y%m%d"`.log                          &
pid7=$!
tail -f --lines=$NbLinesBefore $SLE/log/P10_AP_recv_`date +"%Y%m%d"`.log    > $Result/P10_AP_recv_`date +"%Y%m%d"`.log          &
pid8=$!
tail -f --lines=$NbLinesBefore $SLE/log/P10_AP_send_`date +"%Y%m%d"`.log    > $Result/P10_AP_send_`date +"%Y%m%d"`.log          &
pid9=$!
tail -f --lines=$NbLinesBefore $SLE/log/P10_P3_recv_`date +"%Y%m%d"`.log    > $Result/P10_P3_recv_`date +"%Y%m%d"`.log          &
pid10=$!
tail -f --lines=$NbLinesBefore $SLE/log/P10_P3_send_`date +"%Y%m%d"`.log    > $Result/P10_P3_send_`date +"%Y%m%d"`.log          &
pid11=$!
tail -f --lines=$NbLinesBefore $P3/log/p3_`date +"%Y%m%d"`.log    > $Result/p3_`date +"%Y%m%d"`.log  &
pid12=$!
tail -f --lines=$NbLinesBefore $Glts/log/glts_`date +"%Y%m%d"`.log     > $Result/glts_`date +"%Y%m%d"`.log &
pid13=$!
#tail -f --lines=$NbLinesBefore $scpipe_selector_p3/log/scpipe_selector_p3-`date +"%Y%m%d"`.log    > $Result/scpipe_selector_p3-`date +"%Y%m%d"`.log    &
#pid14=$!
#tail -f --lines=$NbLinesBefore $scpipe_p3_VB/log/scpipe_vb_p3-`date +"%Y%m%d"`.log    > $Result/scpipe_vb_p3-`date +"%Y%m%d"`.log    &
#pid15=$!

echo "Press enter to stop your 'tail'..."
read resultKey

echo "Stop these 'tail' process: $pid1 $pid2 $pid3 $pid4 $pid5 $pid6 $pid7 $pid8 $pid9 $pid10 $pid11 $pid12 $pid13"
kill -TERM $pid1 $pid2 $pid3 $pid4 $pid5 $pid6 $pid7 $pid8 $pid9 $pid10 $pid11 $pid12 $pid13

# pour voir s'il reste des tail en attente :  ps -edf | grep tail
# pour effacer les 'tail' fantomes:        pidof tail      ensuite on copie la liste des pid, puis:     kill -9 <coller liste des pid>

 

 

 

 

Écrire commentaire

Commentaires: 32
  • #1

    gBqsPxAZ (mardi, 04 octobre 2022 15:41)

    20

  • #2

    gBqsPxAZ (mardi, 04 octobre 2022 15:42)

    20

  • #3

    gBqsPxAZ (mardi, 04 octobre 2022 15:44)

    20

  • #4

    gBqsPxAZ (mardi, 04 octobre 2022 15:44)

    20

  • #5

    gBqsPxAZ (mardi, 04 octobre 2022 15:45)

    20

  • #6

    gBqsPxAZ (mardi, 04 octobre 2022 15:46)

    20

  • #7

    gBqsPxAZ (mardi, 04 octobre 2022 15:46)

    OVVz4Dc8

  • #8

    gBqsPxAZ (mardi, 04 octobre 2022 15:47)

    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/

  • #9

    gBqsPxAZ (mardi, 04 octobre 2022 15:47)

    -5 OR 391=(SELECT 391 FROM PG_SLEEP(15))--

  • #10

    gBqsPxAZ (mardi, 04 octobre 2022 15:48)

    TVfwEvmj')) OR 684=(SELECT 684 FROM PG_SLEEP(15))--

  • #11

    gBqsPxAZ (mardi, 04 octobre 2022 15:48)

    20

  • #12

    gBqsPxAZ (mardi, 04 octobre 2022 15:49)

    20

  • #13

    gBqsPxAZ (mardi, 04 octobre 2022 15:49)

    20

  • #14

    gBqsPxAZ (mardi, 04 octobre 2022 15:50)

    20

  • #15

    gBqsPxAZ (mardi, 04 octobre 2022 15:50)

    20

  • #16

    gBqsPxAZ (mardi, 04 octobre 2022 15:51)

    20

  • #17

    gBqsPxAZ (mardi, 04 octobre 2022 15:52)

    20

  • #18

    gBqsPxAZ (mardi, 04 octobre 2022 15:54)

    20

  • #19

    1 waitfor delay '0:0:15' -- (mardi, 04 octobre 2022 15:54)

    20

  • #20

    3lDwO3hb')) OR 567=(SELECT 567 FROM PG_SLEEP(15))-- (mardi, 04 octobre 2022 15:55)

    20

  • #21

    gBqsPxAZ (mardi, 04 octobre 2022 15:55)

    20

  • #22

    gBqsPxAZ (mardi, 04 octobre 2022 15:56)

    20

  • #23

    gBqsPxAZ (mardi, 04 octobre 2022 15:57)

    20

  • #24

    gBqsPxAZ (mardi, 04 octobre 2022 15:57)

    20

  • #25

    gBqsPxAZ (mardi, 04 octobre 2022 15:58)

    20

  • #26

    gBqsPxAZ (mardi, 04 octobre 2022 15:58)

    20

  • #27

    gBqsPxAZ (mardi, 04 octobre 2022 15:59)

    20

  • #28

    gBqsPxAZ (mardi, 04 octobre 2022 15:59)

    20

  • #29

    gBqsPxAZ (mardi, 04 octobre 2022 16:00)

    20

  • #30

    gBqsPxAZ (mardi, 04 octobre 2022)

    20

  • #31

    gBqsPxAZ (mardi, 04 octobre 2022 16:06)

    20

  • #32

    lxbfYeaa (mardi, 05 décembre 2023 06:00)

    20