Load testing and Tsung - while start recording - tsung

I face this problem when I start recording or start tsung with command
1) sh tsung-recorder.sh start
2) sh tsung.sh start
--------error---------
tsung-recorder.sh: line 61: [: 5.7.5: unary operator expected
Starting Tsung recorder on port 8090
[root#aum44 tsung-1.4.2]# {"init terminating in do_boot",{'cannot get bootfile','/usr/lib/erlang//lib/tsung_recorder-1.4.2/priv/tsung_recorder.boot'}}
--------error---------
What should I do to solve this issue?

I presume you do ./configure, and make to compile if all was ok you have now to install tsung, if not you won't be able to run tsung, if you want to run it from the directory where the sources are you have to edit tsung.sh to fix paths.

Related

How can I connect remote Opencpu server installed in RHEL/centOS platform and use opencpu JS to get results from R?

I am trying to connect R from a browser using opencpu js. I cannot have opencpu in local mode and I need it to run in remote host so that my javascript based app server can be access by multiple users from where bunch of input data needs to be sent to openCPU server and R modules should work independently for each user.
I have a centOS6 instance where I have R installed properly.
I have managed to install openCPU as well using the rpm binary https://archive.opencpu.org/centos-6/.
The installation was successful but ended with:
sudo rpm -ivh opencpu-server-2.1.0-rpm0.x86_64.rpm
Preparing... ########################################### [100%]
1:opencpu-server ########################################### [100%]
/var/tmp/rpm-tmp.T2qZY9: line 13: systemctl: command not found
/var/tmp/rpm-tmp.T2qZY9: line 14: systemctl: command not found
/var/tmp/rpm-tmp.T2qZY9: line 13: systemctl: command not found
/var/tmp/rpm-tmp.T2qZY9: line 14: systemctl: command not found
,which means the stage where after successful installation the server gets started, has failed as systemctl is not present in centOS.
So my questions are:
- what is the best way to start the openCPU server ?
- how can i change the port as i don't have all ports open ?
- Is this approach of connecting remote openCPU server instance from browser feasible or am I in a wrong direction?
Any pointers would be very helpful.
Thanks in advance.
You can probably ignore this error. Does this work on your server?
curl http://localhost/opcu/info
What do you see if you run sudo apachectl restart?

How can I stop the http server, downloaded using 'npm install http-server"?

How can I stop the http server, downloaded using 'npm install http-server" comand in terminal (console) and launched then?
Simply Ctrl+C, if you read the output after you launch it, you should see:
Starting up http-server, serving xxx
Available on:
http://<some ip>:<some port>
Hit CTRL-C to stop the server
Its built on node so Kill the node process for stopping it if it stuck. You can find all the node process ids and see what I'd your server have and kill that.

Start Scrapyd as service

I would like to start scrapyd as service but when I start scrapyd,
if I close the SSH session the service scrapyd close automatically.
When I try to start as service like this I have an error :
root#vps:~# service scrapyd start
scrapyd: Failed to start scrapyd.service: Unit scrapyd.service failed to load: No such file or directory.
And when i try to start daemon scrapyd the CURL request return :
{"status": "error", "message": "Use \"scrapy\" to see available commands", "node_name": "vps"}
Can someone help me to start my scrapyd as service please !
daemon --chdir=/home/Crawler scrapyd
I need to set the --chdir to load the service on the Scrapy folder !
I could not get my scrapyd start through /etc/rc.local or crontab so I found a work around. I am sure there will be a better way but for mean time this worked for me.
I created a python file start.py.
import os
os.system('/usr/bin/python3 /home/ubuntu/.local/bin/scrapyd > /home/ubuntu/scrapy.log &')
And simply call the python file start.py through crontab.
Add this to crintab file by cronat -e.
#reboot /usr/bin/python3 /home/ubuntu/start.py
Basically what I did is execute the scrapy through shell by calling the python filr through crontab.
If anyone finds something better please comment.

virsh console hangs at the escape character "^]"

I am trying to kickstart a newly built VM. I am stuck with the following.
Want to start with a console so that I can include username and other info for this VM:
#vmhost02 ~]$ sudo virsh start --console testengine
Domain testengine started
Connected to domain testengine
Escape character is ^]
It hangs up in there and doesn't listen to any keys except "^]"
Let me know if you need more information for any ideas...
Thanks very much.
1)
You can try to edit /etc/default/grub in the guest, and make sure you have:
GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"
Then execute:
# update-grub
# reboot
2)
If that does not work, try to replace quiet with console=ttyS0 in GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT="... console=ttyS0"
Then again:
# update-grub
# reboot
3)
You may still need to try:
# systemctl enable serial-getty#ttyS0.service
# systemctl start serial-getty#ttyS0.service
# reboot
You would need to define a tty to be used as a virtual console. In case you have access to your vm either using vnc or ssh create the following file
vi /etc/init/ttyS0.conf
The content should be something like
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 38400 ttyS0 vt102 # This is your term type vt102
Save these settings and subsequently from your host machine
virsh destroy [vm-name]; service libvirtd stop; service libvirtd start; virsh start [vm-name]
I'm doing here a stop/start of libvirt, because it sometimes tend to not send a SIGTERM to libvirt.
Finally try
virsh console [vm-name]
May be simpler than the solution of val0x00ff, you shall add the console=ttyS0 at the end of the kernel lines in the /boot/grub2/grub.cfg file of the VM (this is not done by default it seems):
(vm)$> grubby --update-kernel=ALL --args="console=ttyS0"
(vm)$> reboot
Then virsh console shall work as expected.

Monit fails to execute the complete command in start program

I'm using monit 5.4 on Mac 10.7.4 machine. When i tried to execute a example configuration
check process syslogd with pidfile /var/run/syslogd.pid
start program = "/etc/init.d/sysklogd start"
stop program = "/etc/init.d/sysklogd stop"
if 5 restarts within 5 cycles then timeout
from monit wiki page, I get the following error.
'syslogd' process is not running
'syslogd' trying to restart
'syslogd' start: /etc/init.d/sysklogd
'syslogd' failed to start
Monit does not take the complete command given in the "start program" of the monitrc file. It just takes the first word in the command and tries to execute it and fails. Is this a known issue? If yes, does it have a workaround? If not, what am i missing here and how to get it working?
Thanks in advance.
Try this (from http://mmonit.com/wiki/Monit/FAQ#execution)
start program = "/bin/bash -c '/etc/init.d/blah start'"
Does /etc/init.d/sysklogd actually exist?
On 10.8 I have /etc/init.d/syslog and manually running /etc/init.d/syslog restart works fine.

Resources