Menu

#47 /functions/scripts/pingCheck.php > web gui freezes (v0.9)

version 0.8
closed
nobody
None
1
2018-02-13
2013-11-14
Volkan
No

Hi if i start the /functions/scripts/pingCheck.php the gui becomes a loading state and freezes and nothing more happens.

The top command Show no Special things on the machine himself (?)

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
32 root 20 0 0 0 0 S 0.3 0.0 0:02.94 kworker/1:1
7769 master 20 0 94848 1936 1012 S 0.3 0.2 0:00.01 sshd
7868 master 20 0 20652 1580 1112 R 0.3 0.2 0:00.09 top
1 root 20 0 26936 2756 1412 S 0.0 0.3 0:01.31 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0
4 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
11 root 20 0 0 0 0 S 0.0 0.0 0:01.44 rcu_sched
12 root 20 0 0 0 0 S 0.0 0.0 0:01.68 rcuos/0
13 root 20 0 0 0 0 S 0.0 0.0 0:01.31 rcuos/1
14 root rt 0 0 0 0 S 0.0 0.0 0:00.90 watchdog/0
15 root rt 0 0 0 0 S 0.0 0.0 0:00.78 watchdog/1
16 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/1
17 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/1
19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs

Thats my config-scan.php

/

* Config file for network scanning paths etc

*/

//general configs
$scanMaxHosts = 16; // maximum number of scans per once
$scanDNSresolve = true; // try to resolve DNS name
$scanIPv6 = false; // not yet

//configs
$MAX_THREADS = 128; // set max concurrent threads

// ping path
$pathPing = "/bin/ping";

// nmap path
$pathNmap = "/usr/local/bin/nmap";

?>

Any idea or help?

thx
Volkan

Related

Support Requests: #47

Discussion

  • Volkan

    Volkan - 2013-11-14

    Ok, after a while i got this message:

    Warning: Threading is not supported!

    ?

     
  • Anonymous

    Anonymous - 2013-11-19

    i got this message (Warning: Threading is not supported! ) too!!

    what to do?

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-11-19

    Hi, means that threading is not supported in your php installation, you need to configure it with pcntl php extension (php-cli).

    Threading means it executes parallel pings (128 in your case), if threading is not possible it executes each ping, waits for response, than next ping etc. and it takes ages.

    So just recompile php with pcntl extension and you will be fine.

    brm

     
  • Volkan

    Volkan - 2013-11-19

    Thank you miha, but i have no clue how to complile it and integrate/activate with the existiting ubuntu/php5 without installing all new... :(

    Any tutorial/help for me?

    thank you very much.
    Volkan

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-11-20

    Hi, have checked some online and it seems it is not that simple on ubuntu. Here is a link that might help you:
    http://www.lahory.com/howto-enable-pcntl-in-ubuntu-php-installations/
    also check php.ini for disabled functions, if there is some pcntl* inside...

    If I'll have time I will install ubuntu on virtual machine and check what can be done.

    brm

     

    Last edit: Miha Petkovsek 2013-11-20
  • Graham Oz

    Graham Oz - 2013-12-16

    I am having trouble with this script too. I did work without Threading (pcntl), but after installing pcntl it is having problems and just seems to hang. No web page displayed.
    I have started to add some diagnostics to the php so I will give some more feedback on the progress.

    BTW - thanks for your work Miha this is a great system.
    Thanks,
    Graham

     
  • Miha Petkovsek

    Miha Petkovsek - 2013-12-17

    Hi, what happens in this case:
    - set Check hosts status to any subnet (at least 1)
    - manually run cron script that checks IP address statuses: php /var/www/phpipam/functions/scripts/pingCheck.php

     
    • Graham Oz

      Graham Oz - 2013-12-17

      Hi
      I have been adding some diagnostics - for my case. There appears to be a problem in Thread.php. I have reached the point where I think it is the pcntl_signal function in the Start method. It appears the stop apache processing. Bear with me I am home and don't have the code in front of me.
      But the sequence is like -
      Start processing address list
      If threading available - yes
      Fork the process - success
      Parent process had child PID
      This happens a number of times
      Later (asynchronous) first child process starts
      Attempts to add signal using pcntl_signal()
      Child process halts
      Parent process halts too.

      I hope this makes sense.

      Graham


      On 17 Dec 2013, at 6:38 pm, "Miha Petkovsek" myha@users.sf.net wrote:

      Hi, what happens in this case:
      - set Check hosts status to any subnet (at least 1)
      - manually run cron script that checks IP address statuses: php /var/www/phpipam/functions/scripts/pingCheck.php

      [support-requests:#47] /functions/scripts/pingCheck.php > web gui freezes (v0.9)

      Status: open
      Created: Thu Nov 14, 2013 10:16 AM UTC by Volkan
      Last Updated: Mon Dec 16, 2013 11:13 PM UTC
      Owner: nobody

      Hi if i start the /functions/scripts/pingCheck.php the gui becomes a loading state and freezes and nothing more happens.

      The top command Show no Special things on the machine himself (?)

      PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
      32 root 20 0 0 0 0 S 0.3 0.0 0:02.94 kworker/1:1
      7769 master 20 0 94848 1936 1012 S 0.3 0.2 0:00.01 sshd
      7868 master 20 0 20652 1580 1112 R 0.3 0.2 0:00.09 top
      1 root 20 0 26936 2756 1412 S 0.0 0.3 0:01.31 init
      2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 kthreadd
      3 root 20 0 0 0 0 S 0.0 0.0 0:00.04 ksoftirqd/0
      4 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0
      5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
      7 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/0
      8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
      9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
      10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
      11 root 20 0 0 0 0 S 0.0 0.0 0:01.44 rcu_sched
      12 root 20 0 0 0 0 S 0.0 0.0 0:01.68 rcuos/0
      13 root 20 0 0 0 0 S 0.0 0.0 0:01.31 rcuos/1
      14 root rt 0 0 0 0 S 0.0 0.0 0:00.90 watchdog/0
      15 root rt 0 0 0 0 S 0.0 0.0 0:00.78 watchdog/1
      16 root rt 0 0 0 0 S 0.0 0.0 0:00.03 migration/1
      17 root 20 0 0 0 0 S 0.0 0.0 0:00.01 ksoftirqd/1
      19 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/1:0H
      20 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 khelper
      21 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs

      Thats my config-scan.php

      /

      • Config file for network scanning paths etc

      */
      //general configs
      $scanMaxHosts = 16; // maximum number of scans per once
      $scanDNSresolve = true; // try to resolve DNS name
      $scanIPv6 = false; // not yet

      //configs
      $MAX_THREADS = 128; // set max concurrent threads

      // ping path
      $pathPing = "/bin/ping";

      // nmap path
      $pathNmap = "/usr/local/bin/nmap";

      ?>

      Any idea or help?

      thx
      Volkan

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/phpipam/support-requests/47/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Support Requests: #47

      • Anonymous

        Anonymous - 2016-05-18
        Post awaiting moderation.
  • Graham Oz

    Graham Oz - 2013-12-18

    Hi,

    Can these post be edited after submitting?
    Graham

     
  • Graham Oz

    Graham Oz - 2013-12-18

    Also my issues are with v0.9.
    I am still trying to work it out.

    Graham

     
  • Graham Oz

    Graham Oz - 2013-12-19

    Hi,
    I feel like a goose.
    As shown by Miha above, pingCheck.php must be run from the command line, or cron job.
    php /var/www/phpipam/functions/scripts/pingCheck.php

    It cannot be run in a web browser as - http://xxx.xx.xx.xx/phpipam/functions/scripts/pingCheck.php

    Thanks,
    Graham

     
  • Miha Petkovsek

    Miha Petkovsek - 2014-03-04
    • status: open --> closed
     
  • Anonymous

    Anonymous - 2018-02-13
    Post awaiting moderation.

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.