<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Ibm on Blog GoHugo de Fredô : Linux, Proxmox, IA, Trail, Course, Randonnée, Gravel, Ski de Randonnée</title>
    <link>https://move.cyber-neurones.org/tags/ibm/</link>
    <description>Recent content in Ibm on Blog GoHugo de Fredô : Linux, Proxmox, IA, Trail, Course, Randonnée, Gravel, Ski de Randonnée</description>
    <generator>Hugo</generator>
    <language>fr</language>
    <lastBuildDate>Fri, 25 Sep 2020 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://move.cyber-neurones.org/tags/ibm/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>IBM VPN : How to check the status under Ubuntu ?</title>
      <link>https://move.cyber-neurones.org/post/2020/09/2020-09-25-ibm-vpn-how-to-check-the-status-under-ubuntu/</link>
      <pubDate>Fri, 25 Sep 2020 00:00:00 +0000</pubDate>
      <guid>https://move.cyber-neurones.org/post/2020/09/2020-09-25-ibm-vpn-how-to-check-the-status-under-ubuntu/</guid>
      <description>&lt;p&gt;Here my script (CheckVPN.sh) to check the status of VPN with logs in syslog :&lt;/p&gt;&#xA;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# cat ./CheckVPN.sh &#xA;&#xA;grep &amp;#34;naclient_poll&amp;#34; /var/log/syslog* | sed &amp;#39;s/:/ /1&amp;#39; | awk &amp;#39;{print $2 &amp;#34; &amp;#34; $3 &amp;#34; &amp;#34; $4 &amp;#34; &amp;#34; $10}&amp;#39; | sort &amp;gt; /tmp/naclient_poll.txt&#xA;&#xA;filename=&amp;#39;/tmp/naclient_poll.txt&amp;#39;&#xA;n=1&#xA;m=0&#xA;previous_state=0&#xA;while read line; do&#xA;&#x9;state=`echo $line | awk &amp;#39;{print $4}&amp;#39;`  &#xA;&#x9;if [ $previous_state = $state ] &#xA;&#x9;&#x9;then&#xA;&#x9;&#x9;&#x9;#echo &amp;#34;Line No. $n $state : $line&amp;#34;&#xA;&#x9;&#x9;&#x9;m=$((m+1))&#xA;&#x9;&#x9;else&#xA;&#x9;        &#x9;echo &amp;#34;Line No. $n $state (new state) $m : $line&amp;#34;&#xA;&#x9;&#x9;&#x9;if [ $previous_state = 1 ]&#xA;&#x9;&#x9;&#x9;&#x9;then&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;echo &amp;#34; Network is down&amp;#34;&#xA;&#x9;&#x9;&#x9;fi&#xA;&#x9;&#x9;&#x9;if [ $state = 1 ]&#xA;                                then&#xA;                                        echo &amp;#34; Network is up&amp;#34;&#xA;                        fi&#xA;&#x9;&#x9;&#x9;previous_state=${state}&#xA;&#x9;&#x9;&#x9;m=0&#xA;&#x9;fi&#xA;&#x9;n=$((n+1))&#xA;done &amp;lt; $filename&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
