Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Check the serial of a facility:
-Login with system/admin
-Execute:  cat /opt/azeti/SiteController/config/SiteController.cfg | grep serial

Do a security copy of the configuration before touching it:
cp /opt/azeti/SiteController/config/SiteController.cfg /opt/azeti/SiteController/config/SiteController.cfg.backup
Restoring the copy of the configuration if things does not seem to work:
cp /opt/azeti/SiteController/config/SiteController.cfg.backup /opt/azeti/SiteController/config/SiteController.cfg
Show hostname in the linux interface:
cat /etc/hostname

Edit the serial of a facility:
vi /opt/azeti/SiteController/config/SiteController.cfg
Some vi commands: 
press <esc> to start any command
"i" for editing
Change what you want to change
<esc>:wq  To write and exit
<esc>:q!  To exit without saving anything
<esc>dd  To delete the line where you have the cursor
Restart Site Controller:
/opt/azeti/SiteController/run_SiteController.py restart
Check status of Site Controller:
/opt/azeti/SiteController/run_SiteController.py status
Start Site Controller:
/opt/azeti/SiteController/run_SiteController.py start
Start a module of Site Controller:
Ej: Modbus
/opt/azeti/SiteController/run_SiteController.py start  ModbusMaster.py
Stop a module of Site Controller:
Ej: Modbus
/opt/azeti/SiteController/run_SiteController.py stop  ModbusMaster.py
Check if a template is there and read it:
ls -la /opt/azeti/SiteController/config/sensor_config.xml
cat /opt/azeti/SiteController/config/sensor_config.xml
Check mosquitto configuration:
#Note: showing the right parameters for a IR910
# cat /opt/azeti/SiteController/config/SiteController.cfg | grep mosquitto
mosquitto_folder = /mnt/apps
mosquitto_cfg_folder = /mnt/apps/etc/mosquitto
Please note: If you search for mosquitto (Command is: "find / -name mosquitto") it is displaying multiple occourences of mosquitto on the system. Since it is only searching for the string "mosquitto", it also displays stuff, that we do not care about. For example find is also displaying "/mnt/apps/mosquitto/sbin/mosquitto" - this is a executable of mosquitto. We only have to tell the SiteController, in which directory the mosquitto-stuff is placed. So instead of "/mnt/apps/mosquitto/sbin/mosquitto", we can tell the system to look under "/mnt/apps/mosquitto", because the SC automatically appends "/sbin/mosquitto" to find the executable. This is mentioned here, because it is one of the most frequent misconfigurations done by customers.

Read the log of a module live:

# tail -f /opt/azeti/SiteController/log/ModbusMaster.log
Modbus operations
CE-AD81-34N3-0.2/ 0-10V
modpoll_ex -p none -b 9600 -t 4 -a 8 -0 -r 16 -s 1  -c  12  /dev/ttyUSB1
Modbus fuel sensor
modpoll_ex -a 1 -b 9600 -d 8 -p none -s 1 -t 4 -0 -o 3 -1 -r 01  -c 10 10.0.0.211
CE_AU11_DC_Voltagemeter (RTU)
modpoll_ex -a 7 -b9600 -d 8 -p none -0 -r 16 -t 4 -s 1 -c 1 /dev/ttyUSB1
 
 
 
Modbus daemon configuration
COM1
COM2
/dev/ttyUSB1
/dev/ttyUSB0
daemon_id 0
daemon_id 1
Check for libraries:
PYTHONPATH=/mnt/data/azeti/SiteController/lib/lib/python2.7/site-packages /mnt/data/azeti/SiteController/src/test_lib_installed.py
Know the real IP from a site connected to the broker:
Go to the broker server (172.16.69.4)
$cat output.txt | grep PAUL
If it is not there: script to re-search
$./checkRange.sh
Error while starting mosquitto:
Starting mosquitto ...
Traceback (most recent call last):
  File "/opt/azeti/SiteController/run_SiteController.py", line 1540, in <module>
    exit_code = main(sys.argv)
  File "/opt/azeti/SiteController/run_SiteController.py", line 1499, in main
    start_mosquitto()
  File "/opt/azeti/SiteController/run_SiteController.py", line 1026, in start_mosquitto
    '-d'])
  File "/opt/azeti/SiteController/run_SiteController.py", line 707, in start_submodule
    LOGGER.exception('Exception while trying to run command "%s":' % cmd)
AttributeError: 'NoneType' object has no attribute 'exception'
This means: mosquitto could not start. Probably due to path to mosquitto.
Configuration of fuel tank parameters:
Retrieve a log file from a site
Normally you do not have direct access from your computer to the site, so you need to execute a command to retrieve the file: scp
#scp system@10.202.0.15:/opt/azeti/SiteController/log/ModbusMaster.log .
Check the available disk space on the system
# df -h
Filesystem                Size      Used Available Use% Mounted on
ubi0:rootfs             105.5M     35.0M     70.5M  33% /
devtmpfs                502.4M         0    502.4M   0% /dev
tmpfs                   502.5M         0    502.5M   0% /dev/shm
tmpfs                   256.0M      5.0M    251.0M   2% /tmp
none                      4.0K         0      4.0K   0% /sys/fs/cgroup
ubi1_0                  105.9M     72.0K    101.1M   0% /opt
ubi2_0                  218.4M     32.5M    181.2M  15% /mnt/apps
ubi3_0                    1.2G    143.1M      1.0G  12% /mnt/data
Read notifications log in Tomcat:
root@azetidigicel3:/var/log/tomcat8# tail -f azeti_notifications.log
Fake event Generation_Voltage:
Digicel/events/NATIONAL-CHEST-HOSPITAL/Generator_Voltage
CRITICAL
[
    {
        "hd": [
            {
                "processing_level": 0,
                "sensor_id": "Generator_Voltage",
                "timestamp": "2016-03-18T08:41:44.862Z-0500",
                "value": 99.099999999999994
            }
        ],
        "output": "eval based on 99.1",
        "sensor_id": "Generator_Voltage",
        "severity": 200,
        "state": "CRITICAL",
        "timestamp": "2016-03-18T08:41:44.939Z-0500"
    }
]
RUNNING
[
    {
        "hd": [
            {
                "processing_level": 0,
                "sensor_id": "Generator_Voltage",
                "timestamp": "2016-03-18T08:41:45.858Z-0500",
                "value": 115.0
            }
        ],
        "output": "eval based on 115.0",
        "sensor_id": "Generator_Voltage",
        "severity": 100,
        "state": "RUNNING",
        "timestamp": "2016-03-18T08:41:45.938Z-0500"
    }
]
STOPPED
[
    {
        "hd": [
            {
                "processing_level": 0,
                "sensor_id": "Generator_Voltage",
                "timestamp": "2016-03-18T08:41:57.860Z-0500",
                "value": 0.0
            }
        ],
        "output": "eval based on 0.0",
        "sensor_id": "Generator_Voltage",
        "severity": 0,
        "state": "STOPPED",
        "timestamp": "2016-03-18T08:41:57.936Z-0500"
    }
]
Simulate cloud_connected
Digicel/events/NATIONAL-CHEST-HOSPITAL/cloud_connected
[
    {
        "hd": [],
        "output": "Location connected...",
        "sensor_id": "cloud_connected",
        "severity": 0,
        "state": "CONNECTED",
        "timestamp": "2016-03-18T00:20:22.877Z-0500"
    }
]
To reboot a Cisco:
#reboot
To stop a Cisco:
#halt
  • No labels