QNX常用小技巧

QNX常用小技巧 

1.跳过登陆

跳过图形:
在/etc/rc.d/rc.local中增加/usr/photon/bin/Photon -l '/usr/photon/bin/phlogin -O -Uuser:password'
跳过命令行:
修改/etc/config/ttys文件,con1 "/bin/login -f root" qansi-m on

 

2.使用Pindows

/etc/inetd.conf文件里去掉此句注释:phrelay stream tcp nowait root /usr/bin/phrelay phrelay -x

杀死并重新运行inetd:1.#slay inetd              2.#inetd

 

3.去掉shelf [Photon Shelf Manager -- 边框

用命令#shelf -e

或 A more permanent approach is to set the PHSHELF_DISABLE environment variable to 1. You can do this in your .profile file, with export PHSHELF_DISABLE=1

 

4.登入时进命令行模式

/etc/rc.d/rc.sysinit runs tinit. [If the -p option is specified, tinit starts Photon.]By default, the system starts Photon, but if you create a file called /etc/system/config/nophoton, then rc.sysinit tells tinit to use text mode.

 

5.自动运行程序

If you want to run a Photon application whenever Photon starts, put it in your $HOME/.ph/phapps file. Put each command on a separate line. For example, to start the Photon editor when you start Photon, include this line: ped &
[注:phapps需加可执行权限,例如 #chmod +x /root/.ph/phapps]

 

6.登陆记录

The login utility also updates system accounting information in var/log/utmp, /var/log/wtmp,and /var/log/lastlog. if they already exist. The login utility doesn't create /var/log/utmp, /var/log/wtmp, and /var/log/lastlog if they don't already exist. These files can quickly become very big, which isn't good on an embedded system with limited resources.

 

7.TCP/IP 网络设置

设置IP,在图形界面可用phlip

在命令行可用:先要确定Network I/O在运行:io-net -dne2000 -ptcpip

指定IP ifconfig en0 10.0.0.100

指定路由:route add default 10.0.0.1

用DHCP自动获取IP dhcp.client -i en0 -m -u -t 1


Start the second instance of the TCP/IP stack by invoking io-net as follows:

io-net -i1 -del900 pci=0x1 -ptcpip prefix=/sock2

The -i option in the second instance of TCP/IP tells io-net to register itself as /dev/io-net1. The prefix option to npm-tcpip.so causes the second stack to be registered as /sock2/dev/socket instead of the default, /dev/socket. TCP/IP applications that wish to use the second stack must specify the environment variable SOCK. For example:SOCK=/sock2 netstat -in
Are io-net and the drivers running? pidin -P io-net mem
Is the TCP/IP protocol stack or Ethernet driver installed? ls /dev/io-net
How do I map hostnames to IP addresses /etc/hosts
How do I get the network status? netstat -in
List the interfaces, including the MAC and IP addresses that they've been configured with. netstat -rn 
Display the network routing tables that determine how the stack can reach another host. netstat -an
List information about TCP/IP connections to or from your system. For the tiny TCP/IP stack, you have to use the following command as it doesn't support netstat:  cat /proc/ipstats
How do I display information about an interface controller? /usr/sbin/nicinfo /dev/io-net/en0


  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
QNX系统中,可以使用很多不同的命令来查看设备内存大小。其中最常用的命令是vmstat、memstat和top。这些命令可以告诉我们整个系统的内存使用情况以及每个进程的内存使用情况。同时也可以使用一些特定的命令来查看某个特定设备的内存大小。 首先,我们需要了解一下在QNX系统中设备内存的概念。在QNX系统中,设备内存通常是指设备所占用的内存空间,包括CPU内存和物理内存。对于一个设备而言,他的内存大小和其工作功能息息相关。某些设备可能只需要占用很小的一部分内存,而某些大型设备则需要大量的内存来存储数据和指令。 为了查看QNX设备的内存大小,可以使用QNX Neutrino的内存管理工具。该工具提供了一些重要的命令,包括vmstat、memstat和top。下面将简单介绍这三个命令的用法。 vmstat命令用于监测系统内存使用和处理器活动情况。要使用该命令,只需在命令行中输入“vmstat”即可。该命令将返回系统当前的内存使用情况以及CPU的活动情况。 memstat命令用于显示QNX系统的内存使用情况和系统内存区域的详细信息。要使用该命令,只需在命令行中输入“memstat”即可。该命令将返回系统当前的内存使用情况,包括内存总量、可用内存、缓存和虚拟内存等方面的详细信息。 top命令用于监测QNX系统中各个进程的CPU和内存活动情况。通过该命令,用户可以了解系统中各个进程的当前状态以及占用资源的情况。要使用该命令,只需在命令行中输入“top”即可。 除了以上三个命令,还可以使用cat /proc/meminfo命令来查看内存信息并了解设备内存的使用情况。 总之,在QNX系统中,可以使用多种不同的命令来查看设备内存大小。用户可以根据自己的需要选择最合适的命令进行监测。同时在使用这些命令时,还需要注意分析返回的数据,以便确定设备内存使用情况是否正常。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值