CLI commands
All command need to be running from user www-data (exept some)
We strongly do not recommend using other commands than the ones listed. This may damage your system
Command must start from sudo -u www-data php artisan
sudo -u www-data php artisan YOUR_COMMAND
Example
sudo -u www-data php artisan grusher:checker geo_count_all
In most cases, there is no need to use these commands as most of them are executed automatically by the system.
Go to Grusher installation path
cd /var/www/html/
and use next commands:
GRUSHER
Asterisk
Script you can see here https://github.com/gviabcua/grusher_asterisk
grusher:asterisk_get call_new {JSON DATA FROM SCRIPT} Get info about new call
grusher:asterisk_get call_to_operator {JSON DATA FROM SCRIPT} Send notify to operator via WS
grusher:asterisk_get call_answer {JSON DATA FROM SCRIPT} Operator is answered
grusher:asterisk_get call_end {JSON DATA FROM SCRIPT} Call was ended
grusher:asterisk_get call_end_permanent {JSON DATA FROM SCRIPT} Call was ended
grusher:asterisk_get ai --type=analize_list --hour=3 Auto processing calls with AI (from build_352)
grusher:asterisk_get ai --type=analize_ai_rec_id --id=1587452 Processing call with AI by record id (from build_352)
Billing
billing:users sync Sync billing user via internal logic
Checker
grusher:checker create_topology Rebuild topology cache (from build 329)
grusher:checker geo_count_all Count fiber length & polygon square without data
grusher:checker geo_recount_all Recount all fiber length & polygon square
grusher:checker get_pon_iface_onu_load_epon Count ONU load in iface EPON to cache
grusher:checker get_pon_iface_onu_load_gpon Count ONU load in iface GPON to cache
grusher:checker onu_counters Count ONUs data to cache
grusher:checker work_with_new_onu Getting data about new ONUs
grusher:checker onu_mass_down_all Getting data ONUs problem like LOS, POWER-OFF to cache
grusher:checker ips Getting data about generators
grusher:checker tasks_future Creating future tasks
Data Base Optimisation
php artisan grusher:db-optimize-all --check-only CHECK ALL Tables (from build_351)
php artisan grusher:db-optimize-all --analyze-only ANALYZE ALL Tables (from build_351)
php artisan grusher:db-optimize-all ANALYZE & OPTIMIZE ALL Tables (from build_351)
Device Discovering
grusher:devicediscovering --ip_network=192.168.1.0/24 Discovering new devices in subnetwork
Fixer
grusher:fixer allow_access Disable global IP filtering
grusher:fixer user_password_reset --user=admin Reset password for frontend user
Geocoder
Updating geo via Visicom or Nominatim
grusher:geocoder update_polygon_empty Update building polygons if no
grusher:geocoder update_polygon_full Update building polygons for all
grusher:geocoder update_geo Update geo position if no lat/lon
grusher:geocoder update_geo_full Update geo position for all
grusher:geocoder update_building_ID Update geo for building with id = ID
Get device status / Get devicestatus subnetwork
grusher:getdevicestatus Get status of all devices in database
grusher:getdevicestatussubnetwork Like previous command
grusher:getdevicestatussubnetwork --ip_network=192.168.1.0/24 For IP subnetwork
grusher:getdevicestatussubnetwork --ip_network=notinsubnetworks For IP what added without Grusher subnetwork (manual)
Get server load
grusher:getserverload --data="{JSON_SCRIPT_DATA}" Send server load to WS
Gevents
grusher:gevents update_all Updating main event data
House keeper
grusher:housekeeper --type=clean_main_history Cleaning main history, building trends
grusher:housekeeper --type=clean_onus_history Cleaning ONUs history, building trends
grusher:housekeeper --type=clean_database Cleaning database
Notify
grusher:notify Sending messaged in manual mode
Poller
grusher:poller --type=onu_signals Getting signals from all ONUs
grusher:poller --type=onu_signals_critical Getting signals from critical ONUs
grusher:poller --type=onu_monitoring Monitoring critical ONUs state
grusher:poller --type=onu_monitoring_all Monitoring critical ONUs state
grusher:poller --type=get_onu_iface_metrics Monitoring ONUs traffic
grusher:poller --type=get_ports_metrics Monitoring port traffic
--device_ip=192.168.1.1 - with current IP
--speed=1 - with port speed
grusher:poller --type=ports_monitoring Monitoring port states
--device_ip=192.168.1.1 - with current IP
grusher:poller --type=get_onus Update ONU list on all OLT
grusher:poller --type=get_onus_autoreg Is same but without ZTE, HUAWEI, NOKIA
grusher:poller --type=get_unregistered_onus Search for unregistered ONUs
grusher:poller --type=get_fdb Get MAC addresse from devices
grusher:poller --type=get_vlans_list_to_db Get global VLAN list from devices
grusher:poller --type=get_iferror Get global ports errors from devices
grusher:poller --type=get_all_device_ports_states Get all info from ports
grusher:poller --type=get_sfp_power Get data from devices SFP modules
grusher:poller --type=do_backups Get devices backups
grusher:poller --type=get_metrics Get metrics like CPU, RAM etc
grusher:poller --type=routing_discovery Discovering routing like BGP, OSPF, LLDP, ARP, ROUTE etc
grusher:poller --type=routing_monitoring Monitoring BGP, OSPF
grusher:poller --type=personal_cron Run command for some device(s) or ONU(s)
--command=COMMAND COMMAND is get_metrics, get_ports_metrics, device_monitoring
fdb, metric, sfp, onu_list, onu_signals, onu_monitoring
--device_ips=IPS IPS like "192.168.1.1,192.168.1.2"
--onus_list=ONUS ONUS like "ZTEGC1234567,ZTEGC2345678"
Updater
grusher:updater system Update Grusher to current build
grusher:updater system_dev Update Grusher to current development build
grusher:updater device_base Update Grusher device database
grusher:updater languages Update Grusher translation
grusher:updater mac_vendors Update MAC/Vendors from maclookup.app
Web socket
websockets:run Start websocket server of default port
websockets:run --port=1234 Start websocket server of custom port
SYSTEM
Database
Checking if database migration is OK. If errors - write to support
winter:up
Cache
cache:clear Clear memory cache
view:clear Clear theme/files cache
route:clear Clear routes cache
Grusher backup
smallbackup:db Backup current or default database.
smallbackup:plugins Backup current plugins.
smallbackup:storage Backup current or default CMS storage resource.
smallbackup:theme Backup current or default theme.
Schedule
To test you can use this command as is. For production this command must running from sudo or root via CRON. Details
schedule:run Run the scheduled commands
Third party components
grusher:import_export us2grusher Copy all data from Userside maps and upload it to
Grusher map with ability to edit data
No comments to display
No comments to display