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
///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
Anonymous
Ok, after a while i got this message:
Warning: Threading is not supported!
?
i got this message (Warning: Threading is not supported! ) too!!
what to do?
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
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
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
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
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
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
Related
Support Requests:
#47Hi,
Can these post be edited after submitting?
Graham
Also my issues are with v0.9.
I am still trying to work it out.
Graham
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