<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: R77.20.80, cpdiag and crond in Spark Firewall (SMB)</title>
    <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39789#M1622</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the 730 appliance with wifi at home and want to turn off the radio at night and turn it on back in the morning so i have created two very simple bash scripts...one that turns off the wifi and other that turns it off. The scripts works when trigered manually. The issue is with schedulling with the crond. The firmware on my appliance is the latest &lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;R77.20.80 (990172392) and i have crond running.&amp;nbsp;In the logs i can see that crond tried to run the script at the correct time but there is some kind of error that i dont understand.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;2018 Oct 6 21:05:01 FW cron.notice crond[5853]: USER root pid 24301 cmd /SCRIPTS/iskljuci_wifi.sh&amp;nbsp;&amp;nbsp;&lt;BR /&gt;2018 Oct 6 21:05:02 FW user.err root: [System error] CODE_SYS_ERROR (000.000.000) - Unexpected error: attempt to index upvalue '' (a nil value) (Log reference: 153885&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;The scripts to turn of the wifi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#!/bin/bash -f&lt;BR /&gt;clish -c "set wlan radio off"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody explain me the error i can see in the log?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Oct 2018 19:47:46 GMT</pubDate>
    <dc:creator>Djelo_Arnautali</dc:creator>
    <dc:date>2018-10-06T19:47:46Z</dc:date>
    <item>
      <title>R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39788#M1621</link>
      <description>&lt;P&gt;During testing R77.20.80 EA versions, &lt;EM&gt;cpdiag&lt;/EM&gt; was mentioned in the email conversation by CP specialists. I can even search SKs for &lt;EM&gt;cpdiag&lt;/EM&gt; and will even find &lt;EM&gt;sk123294 R77.20.80 for Small and Medium Business Appliances&lt;/EM&gt;&amp;nbsp;in the list of results, but the term/command is not mentioned in the documents visible part (same is true of &lt;EM&gt;sk97443: Support Debug Tools&lt;/EM&gt;). So what does it really do when used as a command ? Download an update:&lt;/P&gt;
&lt;PRE&gt;&lt;BR /&gt;[Expert@zwelfhundertr]# cpdiag&lt;BR /&gt;Log path: /opt/fw1/log/cpdiag.elg&lt;BR /&gt;CPDiag update:&lt;BR /&gt;Verifying CK&lt;BR /&gt;CK is 00-1C-7F-...&lt;BR /&gt;Version is cip&lt;BR /&gt;bUseProxy is 0&lt;BR /&gt;Found update, name is cpdiag_991100024.tar.gz, revision is 991100024&lt;BR /&gt;CPDiag running build: 991100019&lt;BR /&gt;CPDiag download center build: 991100024&lt;BR /&gt;Started downloading updated package&lt;BR /&gt;Download completed&lt;BR /&gt;Update returned: 1&lt;BR /&gt;Launching new version&lt;BR /&gt;Log path: /opt/fw1/log/cpdiag.elg&lt;/PRE&gt;
&lt;P&gt;The mentioned log file contains error messages, in my case it is a licensing warning of cosmetic nature..&lt;/P&gt;
&lt;P&gt;But&amp;nbsp;also a new&amp;nbsp;daemon can be found in top:&lt;/P&gt;
&lt;PRE&gt;5247&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 root&amp;nbsp;&amp;nbsp; S&amp;nbsp;&amp;nbsp;&amp;nbsp; 1084&amp;nbsp;&amp;nbsp; 6720&amp;nbsp;&amp;nbsp; 1%&amp;nbsp;&amp;nbsp; 0% /usr/sbin/crond&lt;/PRE&gt;
&lt;P&gt;That is brand new - and we can see what it does call&amp;nbsp;in file&amp;nbsp;&lt;EM&gt;/pfrm2.0/etc/crontabs/root&lt;/EM&gt;:&lt;/P&gt;
&lt;PRE&gt;22 1 * * * /storage/cpdiag/bin/cpdiag --periodic&lt;/PRE&gt;
&lt;P&gt;So we now have some new possibilities, as cron jobs need only new line(s) in &lt;EM&gt;/pfrm2.0/etc/crontabs/root&lt;/EM&gt; !&lt;/P&gt;</description>
      <pubDate>Wed, 18 Sep 2019 08:33:29 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39788#M1621</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2019-09-18T08:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39789#M1622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the 730 appliance with wifi at home and want to turn off the radio at night and turn it on back in the morning so i have created two very simple bash scripts...one that turns off the wifi and other that turns it off. The scripts works when trigered manually. The issue is with schedulling with the crond. The firmware on my appliance is the latest &lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;R77.20.80 (990172392) and i have crond running.&amp;nbsp;In the logs i can see that crond tried to run the script at the correct time but there is some kind of error that i dont understand.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;2018 Oct 6 21:05:01 FW cron.notice crond[5853]: USER root pid 24301 cmd /SCRIPTS/iskljuci_wifi.sh&amp;nbsp;&amp;nbsp;&lt;BR /&gt;2018 Oct 6 21:05:02 FW user.err root: [System error] CODE_SYS_ERROR (000.000.000) - Unexpected error: attempt to index upvalue '' (a nil value) (Log reference: 153885&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #ffffff;"&gt;The scripts to turn of the wifi:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#!/bin/bash -f&lt;BR /&gt;clish -c "set wlan radio off"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can somebody explain me the error i can see in the log?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2018 19:47:46 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39789#M1622</guid>
      <dc:creator>Djelo_Arnautali</dc:creator>
      <dc:date>2018-10-06T19:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39790#M1623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you please share the line added to cron?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 02:26:12 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39790#M1623</guid>
      <dc:creator>Pedro_Espindola</dc:creator>
      <dc:date>2018-10-08T02:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39791#M1624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;30 17 * * * /SCRIPTS/iskljuci_wifi.sh&lt;BR /&gt;00 07 * * * /SCRIPTS/ukljuci_wifi.sh&lt;BR /&gt;50 2 * * * /storage/cpdiag/bin/cpdiag --periodic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 16:55:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39791#M1624</guid>
      <dc:creator>Djelo_Arnautali</dc:creator>
      <dc:date>2018-10-08T16:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39792#M1625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you already try something like&lt;/P&gt;&lt;P&gt;* * * * * echo "testing123testing" | logger&lt;/P&gt;&lt;P&gt;in /var/spool/cron/crontabs/root - a&amp;nbsp;egrep 'testing' /var/log/messages should show the success of the command. Running the script from CLI does work as expected?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 09:37:22 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39792#M1625</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2018-10-09T09:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39793#M1626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The script works when run from cli manually so the syntax is correct. I will try what you have suggested ,see the result and will let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 10:42:59 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39793#M1626</guid>
      <dc:creator>Djelo_Arnautali</dc:creator>
      <dc:date>2018-10-09T10:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39794#M1627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Am i right to assume that &lt;SPAN style="color: #333333;"&gt;/SCRIPTS/iskljuci_wifi.sh&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;contains the complete path ? Maybe some environment variables are not present when triggered by cron - can you make a cron job that writes the env output to a file ? Then, compare it to the env output from bash CLI.&amp;nbsp;I have had&amp;nbsp;a similar issue&amp;nbsp;before as you can see here: &lt;A _jive_internal="true" href="https://community.checkpoint.com/thread/8781-activate-bashuser-via-script-on-a-embedded-gaia-device?commentID=25985#comment"&gt;Activate bashUser via script on a Embedded Gaia device?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2018 13:11:10 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39794#M1627</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2018-10-09T13:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39795#M1628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The scripts iskjuci_wifi.sh has the full path /SCRIPTS/iskljuci_wifi.sh. I have also put in the script a line that writes a text to a file and the result when crond run the scrips it is the same with the error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2018 Oct 16 19:47:02 FW user.err root: [System error] CODE_SYS_ERROR (000.000.000) - Unexpected error: attempt to index upvalue '' (a nil value) (Log reference: 1539712022)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference is that this time the script writes the text in the file...so the crond is executing the scripts and the script writes the text as expected but can't turn off the wlan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 17:52:42 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39795#M1628</guid>
      <dc:creator>Djelo_Arnautali</dc:creator>
      <dc:date>2018-10-16T17:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39796#M1629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This needs TAC involvement, i would suppose.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2018 11:13:13 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/39796#M1629</guid>
      <dc:creator>G_W_Albrecht</dc:creator>
      <dc:date>2018-10-17T11:13:13Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/59770#M2309</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;To confirm, cron and cpdiag is only included in the 1400 series of devices, correct? I have just tried to access this on an 1180 appliance runnin R77.20.80 and it does not appear to work there..&lt;/P&gt;&lt;P&gt;eg&lt;/P&gt;&lt;P&gt;[Expert@1180_FWL1]# fw ver&lt;BR /&gt;This is Check Point's 1100 Appliance R77.20.80 - Build 455&lt;BR /&gt;[Expert@1180_FWL1]# cpdiag&lt;BR /&gt;-bash: cpdiag: command not found&lt;BR /&gt;[Expert@1180_LFWL1]# ls /pfrm2.0/etc/crontabs&lt;BR /&gt;ls: /pfrm2.0/etc/crontabs: No such file or directory&lt;BR /&gt;-bash: cron: command not found&lt;BR /&gt;[Expert@1180_FWL1]#&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where as on a 1450 appliance I get:&lt;/P&gt;&lt;P&gt;[Expert@1450_FWL1]# fw ver&lt;BR /&gt;This is Check Point's 1450 Appliance R77.20.75 - Build 239&lt;BR /&gt;[Expert@1450_FWL1]# cpdiag&lt;BR /&gt;Log path: /opt/fw1/log/cpdiag.elg&lt;BR /&gt;CPDiag update:&lt;BR /&gt;Verifying CK&lt;BR /&gt;CK is 00-1C-7F-XX-XX-XX&lt;BR /&gt;Version is anp&lt;BR /&gt;bUseProxy is 1&lt;BR /&gt;Proxy is &lt;A href="http://10.XX.XX.XX:8181" target="_blank"&gt;http://10.XX.XX.XX:8181&lt;/A&gt;&lt;BR /&gt;Found update, name is cpdiag_991100024.tar.gz, revision is 991100024&lt;BR /&gt;CPDiag running build: 991100014&lt;BR /&gt;CPDiag download center build: 991100024&lt;BR /&gt;Started downloading updated package&lt;BR /&gt;Download completed&lt;BR /&gt;Update returned: 1&lt;BR /&gt;Launching new version&lt;BR /&gt;Log path: /opt/fw1/log/cpdiag.elg&lt;BR /&gt;[Expert@1450_FWL1]# ls /pfrm2.0/etc/crontabs/&lt;BR /&gt;root&lt;BR /&gt;[Expert@1450_FWL1]#&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 03:41:07 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/59770#M2309</guid>
      <dc:creator>Greg_Harbers</dc:creator>
      <dc:date>2019-08-07T03:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: R77.20.80, cpdiag and crond</title>
      <link>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/59771#M2310</link>
      <description>&lt;P&gt;Just to mention that cron daemon is for internal use only (no support from TAC for it). Whatever you add there will be reset one the next firmware upgrade so keep a copy of it somewhere.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 05:18:25 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Spark-Firewall-SMB/R77-20-80-cpdiag-and-crond/m-p/59771#M2310</guid>
      <dc:creator>HristoGrigorov</dc:creator>
      <dc:date>2019-08-07T05:18:25Z</dc:date>
    </item>
  </channel>
</rss>

