Moxa Technologies UC-7420/7410 user manual Setting the Run-Level

Page 48

UC-7420/7410 User’s Manual

 

Managing Embedded Linux

 

 

 

 

 

 

192.168.3.127 – PuTTY

 

 

 

 

 

 

 

 

 

root@Moxa:~# ps -ef

 

 

 

 

PID

Uid

VmSize Stat Command

 

 

1

root

1296

S

init

 

 

2

root

 

 

S

[keventd]

 

 

3

root

 

 

S

[ksoftirqd_CPU0]

 

 

4

root

 

 

S

[kswapd]

 

 

5

root

 

 

S

[bdflush]

 

 

6

root

 

 

S

[kupdated]

 

 

7

root

 

 

S

[mtdblockd]

 

 

8

root

 

 

S

[khubd]

 

 

10

root

 

 

S

[jffs2_gcd_mtd3]

 

 

32

root

 

 

D

[ixp425_csr]

 

 

34

root

 

 

S

[ixp425 ixp0]

 

 

36

root

1256

S

[ixp425 ixp1]

 

 

38

root

S

stdef

 

 

47

root

1368

S

/usr/sbin/inetd

 

 

53

root

4464

S

/usr/sbin/httpd

 

 

63

nobody

4480

S

/usr/sbin/httpd

 

 

64

nobody

4480

S

/usr/sbin/httpd

 

 

65

nobody

4480

S

/usr/sbin/httpd

 

 

66

nobody

4480

S

/usr/sbin/httpd

 

 

67

nobody

4480

S

/usr/sbin/httpd

 

 

92

bin

1460

S

/sbin/portmap

 

 

97

root

1264

S

/root/tcps2-release

 

 

105

root

1556

S

/usr/sbin/rpc.statd

 

 

109

root

4044

S

/usr/sbin/snmpd –s –l /dev/null

 

 

111

root

2832

S

/usr/sbin/snmptrapd -s

 

 

140

root

1364

S

/sbin/cardmgr

 

 

144

root

1756

S

/usr/sbin/rpc.nfsd

 

 

146

root

1780

S

/usr/sbin/rpc.mountd

 

 

153

root

2960

S

/usr/sbin/sshd

 

 

161

root

1272

S

/bin/reportip

 

 

162

root

3464

S

/bin/massupfirm

 

 

163

root

1532

S

/sbin/getty 115200 ttyS0

 

 

164

root

1532

S

/sbin/getty 115200 ttyS1

 

 

166

root

3464

S

/bin/massupfirm

 

 

168

root

3464

S

/bin/massupfirm

 

 

171

root

3652

S

/usr/sbin/sshd

 

 

172

root

2200

S

-bash

 

 

174

root

1592

S

ps -ef

 

 

root@Moxa:~#

 

 

 

 

 

 

 

 

 

 

 

 

 

Setting the Run-Level

In this section, we outline the steps you should take to set the Linux run-level and execute requests. Use the following command to enable or disable settings:

192.168.3.127 – PuTTY

root@Moxa:/ect/rc.d/rc3.d# ls

S19nfs-common S25nfs-user-server S99showreadyled

S20snmpd S55ssh

S24pcmcia S99rmnologin root@Moxa:/etc/rc.d/rc3.d#

#cd /etc/rc.d/init.d

Edit a shell script to execute /root/tcps2-releaseand save to tcps2 as an example.

#cd /etc/rc.d/rc3.d

#ln –s /etc/rc.d/init.d/tcps2 S60tcps2

3-8

Image 48
Contents UC-7420/7410 User’s Manual Third Edition, JuneCopyright Notice TrademarksDisclaimer Table of Contents Chapter UC Finder Appendix B Windows Tool Chain Introduction Introduction ‰ Hardware IntroductionPackage Checklist Product FeaturesOverview UC-7410-LXProduct Hardware Specifications Appearance and Dimensions Hardware IntroductionAppearance Dimensions Hardware Block Diagram LED IndicatorsLED Name Color Meaning Reset-type Buttons Reset ButtonReset to default Button Real Time ClockPlacement Options Wall or CabinetWiring Requirements Hardware Connection DescriptionDIN-Rail Mounting Connecting the Power Connecting to the NetworkPin Signal Grounding UC-7420/7410Connecting to a Serial Device Connecting to the Console PortCompactFlash Pin RS-232 RS-422 RS-485Software Introduction Software ArchitectureJournaling Flash File System JFFS2 Software PackageSoftware Version Comparison Table Protocol stacks and utilities Directory Change‰ Configuring the Ethernet Interface Getting StartedPowering on UC-7420/7410 Connecting UC-7420/7410 to a PCSerial Console Default IP Address Netmask Telnet Console192.168.3.127 255.255.255.0 192.168.4.127 255.255.255.0SSH Console Windows UsersConfiguring the Ethernet Interface Modifying Network Settings with the Serial ConsoleLinux Users Static IP addressesDynamic IP addresses Configuring the Wlan via the Pcmcia Interface Modifying Network Settings over the NetworkDefault IP address is 192.168.5.127, netmask IEEE802.11b#vi /etc/wlan/wlancfg-any IEEE802.11g Setting Explanation SettingKey1Str, Key2Str, Key3Str, Key4Str-Sets strings Key1 to Key4 TurboRate-Enables or disables TurboRate Installing the Tool Chain Linux Test Program-Developing Hello.cChecking the Flash Memory Space StepCompiling Hello.c You should receive the following responseTesting Environment Developing Your First ApplicationUploading Hello to UC-7420/7410 and Running the Program Compiling tcps2.c #mount -t iso9660 /dev/cdrom /mnt/cdromUploading tcps2-release and Running the Program PuTTY#jobs // use this command to check if the program is running Testing Procedure Summary UC-7420/7410 User’s ManualUC-7420/7410 User’s Manual ‰ System Version Information ‰ System Image Backup Managing Embedded LinuxSystem Image Backup System Version InformationUpgrading the Firmware Upgrading the firmware will erase all data on the Flash ROM#upramdisk #cd /mnt/ramdisk Loading Factory Defaults Backing Up the User File System Firmware versions earlier than V1.5 not includingFirmware version V1.5 and later versions Enabling and Disabling Daemons UC-7420/7410 User’s Manual Managing Embedded Linux Setting the Run-Level Adjusting the System Time Setting the Time ManuallyExample shell script to update the system time periodically NTP ClientUpdating the Time Automatically Cron-daemon to Execute Scheduled Commands Change mode of fixtime.shEnable the cron daemon manually Enable cron when the system boots upConnecting Peripherals USB Mass StorageCF Mass Storage Managing Communications ‰ Iptables ‰ NATWeb Service-Apache Telnet / FTPEnabling the Telnet/ftp server Disabling the Telnet/ftp serverUsr/www/cgi-bin Saving a Web Page to the CF Card Use the following commands to restart the Apache web server Iptables Local Host Packets Observe and erase chain rules Define policy for chain rulesUsage ExamplesAppend or delete rules IptmacEnabling NAT at Bootup NAT ExampleDial-up Service-PPP Example 2 Connecting to a PPP server over a hard-wired link How to check the connection UP Loopback RunningSetting up UC-7420/7410 as an NFS Server Setting up a Machine for Incoming PPP ConnectionsNFS Network File System #vi /etc/exportsSetting up UC-7420/7410 as an NFS Client Mail Steps 2Open VPN Internet IFS=‘ Create link symbols to enable this script at boot time Destination Gateway Genmsk Flags Metric Use Iface Now ping Host B from Host a by typing Setup 3 Routed IP Destination Gateway Genmsk Flags Metric Use Iface Programmer’s Guide Address Size Contents Flash Memory MapLinux Tool Chain Introduction Debugging with GDB Obtaining helpCross Compiling Applications and Libraries Tools Available in the Host EnvironmentDevice API RTC Real Time ClockBuzzer WDT Watch Dog Timer Input Int fd File handle from swtdopen return value Output Special Note User application example ExampleSwtddisableswtdfd Int mainint argc, char *argv Pidt sonpid Example to set the baud rate Example to get the baud rateKeyPad Baud rate inaccuracySpecial Note ExamplesMake File Example UC Finder Installing the Software Windows UC FinderUC-7420/7410 User’s Manual UC Finder Broadcast Search Linux ucfinder System Commands Busybox V0.60.4 Linux normal command utility collectionFile manager EditorProcess OtherMoxa special utilities Windows Tool Chain Introduction Introduction Installation Procedure Select the Root DirectoryUC-7420/7410 User’s Manual Windows Tool Chain Introduction UC-7420/7410 User’s Manual Windows Tool Chain Introduction Using the Bash Shell GDB debug tool-Insight UC-7420/7410 User’s Manual Windows Tool Chain IntroductionUC-7420/7410 User’s Manual Windows Tool Chain Introduction Service Information Moxa Internet Services Following services are providedProblem Report Form Moxa Product † UC-7410-LX † UC-7420-LX Serial NumberProduct Return Procedure