Moxa V2403-C7-W-T [54/90] Watchdog device ioctl commands
![Moxa V2403-C7-W-T [54/90] Watchdog device ioctl commands](/views2/1199383/page54/bg36.png)
V2403 Series Linux Software Programmer’s Guide
4-7
Use the following command to remove it from run-level:
moxa@Moxa:~# sudo insserv -r watchdog
Check the run level removement.
moxa@Moxa:~# ls -l /etc/rc?.d/*watchdog*
ls: cannot access /etc/rc?.d/*watchdog*: No such file or directory
moxa@Moxa:~#
Watchdog Device IOCTL Commands
IOCTL WDIOC_GETSUPPORT
Description Returns the support of the card itself
Input None
Output (struct watchdog_info *) arg
Return On success, returns 0. Otherwise, returns a value < 0.
IOCTL WDIOC_GETSTATUS
Description Returns the status of the card
Input None
Output (int *)arg
Return On success, returns 0. Otherwise, returns a value < 0.
IOCTL WDIOC_GETBOOTSTATUS
Description Returns the status of the card that was reported at bootup.
Input None
Output (int *)arg)
Return On success, returns 0. Otherwise, returns a value < 0.
IOCTL WDIOC_SETOPTIONS
Description Lets you set the options of the card. You can either enable or disable the card.
Input None
Output (int *)arg)
Return On success, returns 0. Otherwise, returns a value < 0.
IOCTL WDIOC_KEEPALIVE
Description Pings the card to tell it not to reset your computer.
Input None
Output
None
Return On success, returns 0. Otherwise, returns a value < 0.
IOCTL WDIOC_SETTIMEOUT
Description Sets the watchdog timeout
Input arg: 1 to 255 seconds
Output None
Return On success, returns 0. Otherwise, returns a value < 0.
IOCTL WDIOC_GETTIMEOUT
Description Gets the current watchdog timeout.
Input None
Output arg: 1 to 255 seconds
Return On success, returns 0. Otherwise, returns a value < 0.
Содержание
- Edition 1 november 2015 1
- V2403 series linux software user s manual 1
- Www moxa com product 1
- Copyright notice 2
- Disclaimer 2
- Technical support contact information 2
- Trademarks 2
- V2403 series linux software user s manual 2
- Www moxa com support 2
- Table of contents 3
- Introduction 5
- Attention 6
- Overview 6
- Software components 6
- Software specifications 6
- V2403 series linux software introduction 6
- Software configuration 7
- Starting from an hdmi console 8
- Connecting from an ssh console 9
- Linux users 9
- Moxa moxa ssh moxa 192 68 27 the authenticity of host 192 68 27 192 68 27 can t be established rsa key fingerprint is 8b ee ff 84 41 25 fc cd 2a f2 92 8f cb 1f 6b 2f are you sure you want to continue connection yes no yes_ 9
- V2403 series linux software software configuration 9
- Windows users 9
- Adjusting the system time 10
- Ntp client 10
- Root moxa home moxa date hwclock mon jun 30 11 39 04 cst 2014 mon 30 jun 2014 11 39 05 am cst 0 60107 seconds root moxa home moxa root moxa home moxa ntpdate time stdtime gov tw 21 aug 15 28 10 ntpdate5876 step time server 118 63 1 1 offset 36042533 94253 sec root moxa home moxa root moxa home moxa hwclock w root moxa home moxa date hwclock fri aug 21 15 28 18 cst 2015 fri 21 aug 2015 03 28 19 pm cst 0 78792 seconds root moxa home moxa 10
- Setting the time manually 10
- V2403 series linux software software configuration 10
- Attention 11
- Example shell script for updating the system time periodically 11
- How to run the shell script automatically when the kernel boots up 11
- Updating the time automatically 11
- Cron daemon for executing scheduled commands 12
- Enabling and disabling daemons 12
- Minute hour date month week user command 0 8 root path to your program 12
- Moxa moxa sudo etc init d apache2 start 12
- Moxa moxa sudo etc init d apache2 stop 12
- Moxa moxa sudo insserv d apache2 12
- Moxa moxa sudo insserv r apache2 12
- V2403 series linux software software configuration 12
- Attention 13
- Inserting a usb storage device into the computer 13
- Apt installing and removing packages 14
- Attention 14
- Checking the linux version 14
- Root moxa apt get install vim root moxa 14
- Root moxa apt get remove vim purge root moxa 14
- Root moxa apt get remove vim root moxa 14
- Root moxa apt get update root moxa 14
- Root moxa uname a linux moxa 3 6 4 amd64 1 smp debian 3 6 ckt9 2 2015 04 13 x86_64 gnu linux root moxa 14
- Root moxa vi etc apt sources list deb http ftp us debian org debian jessie main contrib non free deb src http ftp us debian org debian jessie main contrib non free deb http ftp us debian org debian jessie updates main contrib non free deb src http ftp us debian org debian jessie updates main contrib non free deb http security debian org jessie updates main contrib non free deb src http security debian org jessie updates main contrib non free deb http ftp debian org debian jessie backports main contrib non free deb src http ftp debian org debian jessie backports main contrib non free 14
- V2403 series linux software software configuration 14
- Attention 15
- Filesystem size used avail use mounted on dev sda1 7 g 1 g 6 g 17 udev 10m 4 k 10m 1 dev tmpfs 773m 8 m 764m 2 run tmpfs 1 g 0 1 g 0 dev shm tmpfs 5 m 0 5 m 0 run lock tmpfs 1 g 0 1 g 0 sys fs cgroup 15
- Root moxa apt get clean root moxa 15
- V2403 series linux software software configuration 15
- Managing communications 16
- Attention 17
- Changing the interfaces configuration file 17
- Changing the network settings 17
- Detecting network interfaces 17
- Moxa moxa cd etc network 17
- Moxa moxa etc network vi interfaces 17
- Pci device 0x10ec 0x8168 r8169 subsystem net action add drivers attr address 00 90 e8 00 00 20 attr dev_id 0x0 attr type 1 kernel eth name eth0 pci device 0x10ec 0x8168 r8169 subsystem net action add drivers attr address 00 90 e8 00 00 21 attr dev_id 0x0 attr type 1 kernel eth name eth1 17
- V2403 series linux software managing communications 17
- Adjusting ip addresses with ifconfig 18
- Dynamic ip address using dhcp 18
- Moxa moxa etc init d networking restart 18
- Moxa moxa ifconfig eth0 192 68 moxa moxa 18
- Static ip address 18
- The loopback network interface auto lo iface lo inet loopback the primary network interface auto eth0 iface eth0 inet static address 192 68 27 netmask 255 55 55 broadcast 192 68 55 auto eth1 iface eth1 inet static address 192 68 27 netmask 255 55 55 broadcast 192 68 55 18
- The primary network interface auto eth0 iface eth0 inet dhcp 18
- V2403 series linux software managing communications 18
- Dns client 19
- Etc hostname 19
- Etc resolv conf 19
- Moxa moxa sudo vi etc hostname moxa 19
- Root moxa etc init d hostname sh start 19
- Root moxa home moxa setinterface dev ttym0 2 root moxa home moxa setinterface dev ttym0 now setting is rs422 interface 19
- Root moxa hostname 19
- Serial port operation mode 19
- Setinterface device node interface no 19
- V2403 series linux software managing communications 19
- Configuring ethernet bonding 20
- Etc nsswitch conf 20
- Apache web server 22
- Default homepage 22
- Disabling the cgi function 22
- Root moxa etc init d apache2 restart 22
- Sudo insserv r bonding sh 22
- Sudo insserv v d bonding sh 22
- V2403 series linux software managing communications 22
- Vi etc apache2 sites enabled 000 default con 22
- Attention 23
- Filter table includes three chains 23
- Iptables 23
- Mangle table includes two chains 23
- Nat table includes three chains 23
- Sub tables 23
- V2403 series linux software managing communications 23
- Iptables hierarchy 24
- Iptables modules 24
- V2403 series linux software managing communications 24
- Attention 25
- Example 25
- Lsmod modprobe ip_tables modprobe iptable_filter modprobe iptable_mangle modprobe iptable_nat 25
- Observe and erase chain rules 25
- V2403 series linux software managing communications 25
- Append or delete rules 26
- Define policy for chain rules 26
- Example 26
- Examples 26
- V2403 series linux software managing communications 26
- Attention 27
- Bin bash if you put this shell script in the home nat sh 27
- Enabling nat at bootup 27
- Nat example 27
- Nat network address translation 27
- V2403 series linux software managing communications 27
- Attention 28
- Nfs network file system client 28
- Example 29
- Attention 30
- Openvpn 30
- Attention 31
- Ethernet bridging for private networks on different subnets 31
- Openvpn genkey secret secrouter key 31
- Point to the peer remote 192 68 74 dev tap0 port 1194 secret etc openvpn secrouter key cipher des ede3 cbc auth md5 tun mtu 1500 tun mtu extra 64 ping 40 up etc openvpn tap0 br sh comp lzo 31
- Scp etc openvpn secrouter key 192 68 74 etc openvpn 31
- Start bin sh value after net is the subnet behind the remote peer route add net 192 68 netmask 255 55 55 dev br0 end 31
- V2403 series linux software managing communications 31
- 68 0 0 255 55 55 u 0 0 0 eth3 33
- 68 0 255 55 55 u 0 0 0 br0 33
- 68 0 255 55 55 u 0 0 0 eth0 33
- 68 0 255 55 55 u 0 0 0 eth2 33
- Attention 33
- Destination gateway genmsk flags metric ref use iface 33
- Etc openvpn bridge restart 33
- Eth_broadcast 192 68 55 gw 192 68 73 33
- Killall term openvpn 33
- Ln sf etc init d openvpn etc rc0 d k80openvpn ln sf etc init d openvpn etc rc6 d k80openvpn 33
- Ln sf etc init d openvpn etc rc2 d s16openvpn 33
- Openvpn config etc openvpn tap0 br conf 33
- Openvpn show ciphers openvpn show auths 33
- Ping 192 68 74 33
- Route add net 192 68 netmask 255 55 55 dev eth0 33
- V2403 series linux software managing communications 33
- Ethernet bridging for private networks on the same subnet 34
- Point to the peer remote 192 68 74 dev tap0 secret etc openvpn secrouter key cipher des ede3 cbc auth md5 tun mtu 1500 tun mtu extra 64 ping 40 up etc openvpn tap0 br sh comp lzo 34
- Routed ip 34
- V2403 series linux software managing communications 34
- Attention 36
- Cell_mgmt usage 36
- Cellular dial up mode 36
- Cellular module 36
- Cellular signal strength 36
- Manual page 36
- Automatic dial up 37
- Cell_mgmt start apn apn username user password pass pin pin_code 37
- Moxa moxa home moxa cell_mgmt start apn internet warning file etc qmi network conf does not exist loading profile apn internet starting network with qmicli d dev cdc wdm1 wds start network internet client no release cid device open net net 802 3 net no qos header saving state cid 8 saving state pdh 1205656072 network started successfully there is no pin code 37
- V2403 series linux software managing communications 37
- Cell_mgmt reset 38
- Cell_mgmt restart 38
- Cell_mgmt stop 38
- Cellular module 38
- Cell_mgmt at at_command 39
- Cell_mgmt gps_off 39
- Cell_mgmt gps_on 39
- Cell_mgmt power_off 39
- Cell_mgmt power_on 39
- Cell_mgmt signal 39
- Cell_mgmt status 39
- Cell_mgmt interface num 40
- Cell_mgmt pin_protection pin pin2 enable disable current_pin 40
- Cell_mgmt set_pin pin 40
- Cell_mgmt sim_status 40
- Set interface 40
- Sim card 40
- Cell_mgmt version 41
- Cellular management 41
- Manual page 41
- Wi fi module 41
- Wifi_mgmt help 41
- Wifi_mgmt usage 41
- Connect to an ap 42
- Wifi_mgmt start num 42
- Wifi_mgmt start type type ssid ssid password password 42
- Insert an ap or choose another ap to connect 43
- Stop or restart network 43
- Wifi_mgmt restart 43
- Wifi_mgmt start 43
- Wifi_mgmt stop 43
- Other functions 44
- Wifi_mgmt scan 44
- Wifi_mgmt scan d 44
- Wifi_mgmt delete 45
- Wifi_mgmt interface num 45
- Wifi_mgmt reconnect 45
- Wifi_mgmt status 45
- Wifi_mgmt version 45
- Wifi_mgmtsignal 45
- Configuring the wireless lan by wpa_supplicant conf 46
- Warning 46
- Attention 47
- V2403 series linux software managing communications 47
- Wlan0 ieee 802 1abgn essid moxa_ap mode managed frequency 2 62 ghz access point 00 1f 1f 8c 0f 64 bit rate 36 mb s tx power 27 dbm retry min limit 7 rts thr off fragment thr off encryption key 1234 5678 90 security mode open power management off link quality 37 70 signal level 73 dbm rx invalid nwid 0 rx invalid crypt 0 rx invalid frag 0 tx excessive retries 0 invalid misc 0 missed beacon 0 47
- Programmer s guide 48
- Device api 49
- Getting the product serial number 49
- Define dio_error_port 1 no such port define dio_error_mode 2 no such mode or state define dio_error_control 3 open or ioctl fail define dio_error_duration 4 the value of duration is not 0 or not in the range 40 duration 3600000 milliseconds 1 hour define dio_error_duration_20ms 5 the value of duration must be a multiple of 20 ms define dio_ok 0 50
- Define dio_high 1 define dio_low 0 50
- Digital i o 50
- Int ioctl fd rtc_rd_time struct rtc_time time description read time information from the rtc it will return the value on argument 3 50
- Int ioctl fd rtc_set_time struct rtc_time time description set rtc time argument 3 will be passed to rtc 50
- Rtc real time clock 50
- V2403 series linux software programmer s guide 50
- V2403 series linux software programmer s guide 51
- Disable no way out 52
- Enable no way out 52
- Enable or disable no way out 52
- Example of setting the default timer 52
- Examples 52
- Introduction 52
- Special note 52
- Watchdog usage 52
- Wdt watch dog timer 52
- How the wdt works 53
- Magic close 53
- Moxa moxa ls l etc rc d watchdog ls cannot access etc rc d watchdog no such file or directory moxa moxa 54
- Moxa moxa sudo insserv r watchdog 54
- V2403 series linux software programmer s guide 54
- Watchdog device ioctl commands 54
- Examples 55
- System recovery 57
- Hardware 58
- Recovery environment 58
- Recovery procedure 58
- Step 1 prepare your usb drive 58
- Usb port 58
- V2403 lx 58
- V2403 series linux software system recovery 58
- V2403 series linux software system recovery 59
- V2403 series linux software system recovery 60
- Step 2 change the bios settings 61
- V2403 series linux software system recovery 61
- V2403 series linux software system recovery 62
- Step 3 restore the system from the usb drive 63
- V2403 series linux software system recovery 63
- V2403 series linux software system recovery 64
- V2403 series linux software system recovery 65
- Step 4 change the bios settings to boot from the original disk 66
- V2403 series linux software system recovery 66
- V2403 series linux software system recovery 67
- V2403 series linux software system recovery 68
- V2403 series linux software system recovery 69
- Saving the system to the usb drive 70
- V2403 series linux software system recovery 70
- V2403 series linux software system recovery 71
- V2403 series linux software system recovery 72
- V2403 series linux software system recovery 73
- Proactive monitoring 74
- Software components 75
- V2403 series linux software software components 76
- V2403 series linux software software components 77
- V2403 series linux software software components 78
- V2403 series linux software software components 79
- V2403 series linux software software components 80
- V2403 series linux software software components 81
- V2403 series linux software software components 82
- V2403 series linux software software components 83
- V2403 series linux software software components 84
- V2403 series linux software software components 85
- V2403 series linux software software components 86
- V2403 series linux software software components 87
- V2403 series linux software software components 88
- V2403 series linux software software components 89
- V2403 series linux software software components 90
Похожие устройства
- Moxa V2403-C7-W-T Руководство по программной части (Windows)
- Moxa V2403-C7-W-T Руководство по быстрой установке
- Moxa V2403-C7-W-T Технические характеристики
- Moxa V2401-CE Инструкция по эксплуатации
- Moxa V2401-CE Руководство по программной части (Windows)
- Moxa V2401-CE Руководство по программной части (Linux)
- Moxa V2401-CE Технические характеристики
- Moxa V2401-CE Руководство по быстрой установке
- Moxa V2401-LX Инструкция по эксплуатации
- Moxa V2401-LX Руководство по программной части (Windows)
- Moxa V2401-LX Руководство по программной части (Linux)
- Moxa V2401-LX Руководство по быстрой установке
- Moxa V2401-LX Технические характеристики
- Moxa V2401-XPE Инструкция по эксплуатации
- Moxa V2401-XPE Руководство по программной части (Windows)
- Moxa V2401-XPE Руководство по программной части (Linux)
- Moxa V2401-XPE Руководство по быстрой установке
- Moxa V2401-XPE Технические характеристики
- Moxa V2402-CE Инструкция по эксплуатации
- Moxa V2402-CE Руководство по программной части (Windows)