Sure. But I'm positive that nothing is wrong with it:If you wish, you can share your problematic script in /etc/cron.daily .
Code:
#!/bin/bashset -eGDBCMD=`mktemp gdbclose_XXXXXX.cmd`PID=`pgrep mysqld`#lsof -p `pgrep mysqld` -Ftfn | sed -r -n -e '2,${ N; s/\n/ /; N; s/\n/ /; /^f(0|1|2) .*/d; s/f([[:digit:]]+) tsock nprotocol: TCP/call close(\1)/p }'lsof -p $PID -Ftfn | sed -r -n -e '2,${ N; s/\n/ /; N; s/\n/ /; /^f(0|1|2) .*/d; s/f([[:digit:]]+) tsock nprotocol: TCP/call close(\1)/p }' >$GDBCMDCNT=`cat $GDBCMD | wc -l`>&2 echo "lsof PID $PID unused socket count: $CNT"if [ $CNT -ge 12 ] ; then gdb -p $PID --batch-silent -x $GDBCMDfiecho "Last run: `date` - PID: $PID, unused sockets: $CNT" >>/var/log/percona_close_socks.logrm $GDBCMDexit 1
In syslog there's only the line:
After that line there's nothing related to cron.daily.Feb 1 21:17:01 xxxxx CRON[1521263]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Statistics: Posted by rantanplan — 2025-02-01 20:51 — Replies 10 — Views 327