Professional Documents
Culture Documents
-121 个问题解答让你从菜鸟到高手
1. Q: Solaris 的系统配置文件一般在什么地方?
A: 可以查看/etc/system 文件,里面有一些 solaris 启动时默认加载的选项,包括
共享内存大小等的设置。
1. 如果连接了网络,我们可以采用远程缓冲溢出的方法,但是这样的方法不属
于"经典"方法,且有的远程缓冲溢出具有一定的破坏性,不建议使用。还
有一种方法就是采用 SUN 公司自带的光盘采取引导,建议采取这种方法:
1. boot cdrom -s
2. fsck /dev/dsk/c0t0d0s0 (取决于根分区的设备)
3. mount -F ufs /dev/dsk/c0t0d0s0 /mnt
4. TERM=ansi; export TERM
5. 编辑/mnt/etc shadow 文件,把 root 对应的口令去掉。
6. 重启后的 root 的口令为空。
2. 如果还有普通用户,方法可以采用本地缓冲溢出,这种方法虽然破坏性小,
但是也有损毁硬盘引导区的危险,建议采用"文件连接"错误是获得 root 权
限,这种方法没有什么危险性。
4. Q: 有时候用 vi 编辑器的时候,显示窗口过大,如何处理?
A: 只需要用鼠标拖曳终端窗口,使其缩小,即可解决。
5. Q: 共享内存大小如何设置?
A: 在 system 文件的最后一行加入 Set shmsys:shminfo_shmmax=XXX
/etc/set shmsys:shminfo_shmmin=XXX
这里的 XXX 是代表共享内存的大小。单位:字节
共享内存一般为内存的一半
例如内存为 512M
设置应为 512/2*1024*1000=262144000
6. Q: root 用户的配置文件在什么地方?
A: root 用户的配置文件和其他用户的配置文件有些不同,它在/etc/profile 文件
中规定。
8. Q: 在 solaris 下,如何查看网络是否配置成功?
A: 可以采用命令 Ifconfig -a 来查看,如果网卡绑定 ip 成功,而不是显示 0.0.0.0
就证明网卡配置基本无误,主要检查网络介质(网线,RJ45 插头...)是否损坏。
9. Q: 如果敲错一个命令如何结束它呢?
A: solaris 和 SCO 有少许不一样,solaris 可以采用 ctrl+C 来结束,而不是 SCO 的
ctrl+Del
SCO:
/etc/gateways
<net|host>; name1 gateway name2 metric value <passive|active|
external>;
所有中间的很长的空均为 TAB
Net,host 表示路由指向是网络还是主机,net 和 host 是关键字
Name1 目的网络名或主机名
Gateway 关键字
Name2 网关名或网关 ip 地址
Metric 关键字
Value 跳数
Passive 关键字,表示被动方式,路由器不叫换路由信息
Active 关键字,表示主动方式,路由器交换路由信息
External 关键字,表示外部方式,其他进程已安装了路由
例如:
net 129.9 gateways 129.6.0.1 metric 1 passive
host 129.7.10.21 gateway 129.6.0.2 metric 1 passive
Solaris
为 defautrouter,只需要在里面填入网关。
在 SERVER 端执行以下步骤
条件:有 340M 的剩余空间
1. 将 Solaris 2.6 的安装盘插入 CD-ROM
2. 将 Solaris 2.6 CD-ROM 的 slice 0 拷贝到硬盘
# cd /cdrom/sol_2_6_sparc_smcc_svr/s0/solaris_2.6/Tools
# ./setup_install_server /export/install
3. 编辑文件/export/autocfg/sysidcfg,以下是它的内容
#Sample sysidcfg file for SPARC systems
system_locale=en_US
timezone=GMT-8
timeserver=10.11.41.10
terminal=dtterm
name_service=NONE
root_password=...(取自/etc/shadow 文件)
4. 编辑文件/etc/hosts,以下是它的内容
10.11.41.10 inssvr loghost
10.11.41.11 inscli
5. 增加安装客户
# cd /export/install
#./add_install_client -e CLIENT 的以太网地址 -i CLIENT 的 IP 地址 -s
inssvr:/export/install -c inssvr:/export/autocfg -p inssvr:/export/autocfg
inscli sun4u
在 CLIENT 端的 OK 提示符下执行
OK boot net - install
Solaris 7 for sparc 与 2.6 的区别,7 没有默认的 sysidcfg 和 autocfg 目录,需要
自
己建立,而且 OK boot net 即可
修改/etc/init.d/inetsvc 第 82 行:
if [ -n "$dnsdomain" ]; then
#dnsservers=`/sbin/dhcpinfo DNSserv`
dnsservers=`cat /etc/dnsservers`
修改/etc/init.d/inetsvc 第 220 行:
/usr/bin/mv /tmp/hosts_clear.$$ /tmp/hosts.$$
mydomain=`cat /etc/defaultdomain`
echo "${ipaddr}\t${hostname}\t${hostname}.${mydomain}\t# Added
by DHCP" >;>;/tmp/hosts.$$
在/etc/init.d/inetsvc 第一行加入如下语句:
if [ -f /etc/dhcp.*[0-9] ]; then
_INIT_NET_STRATEGY="dhcp"
export _INIT_NET_STRATEGY
fi
3. 创建/etc/defaultdomain,内容为 huawei.com.cn
4. 创建/etc/nodename,内容为你的机器名
5. 创建/etc/dnsservers:129.9.111.100 10.15.1.3
解决办法如下:
(1)stop+a 命令
(2)在 ok 提示符下输入:probe-scsi-all
则出现硬盘、光驱、磁带机等设备的实际物理名。
如:/pci@1f,4000/scsi@3,1
cdrom
(3)在 ok 提示符下输入:devalias
则出现硬盘、光驱、磁带机等设备的缺省设置。
如:cdrom /pci@1f,4000/scsi@3/disk6,0:f
这是缺省配置,用 boot cdorm 命令时,cdrom 被解释为
/pci@1f,4000/scsi@3/disk6,0:f
而/pci@1f,4000/scsi@3/disk6,0:f 指示的是内置光驱的设备名,
因此不能从外挂光驱启动!
ufsdump
备份前的准备工作
重新启动系统到单用户状态,或将要备份的文件系统卸载下来。
通知所有用户该文件系统不可用。
#wall
/export/home will be unavailable in two minutes, please log out
Press ctrl-D
对文件系统进行检查(fsck)。
ufsdump
如前例所示。
如果使用渐进的备份方法,最后实现建立备份计划,例如:
上例中,每个月作一次完全备份,每个周末对每一周的改动作一次备份,每天的备
份
只对当天的改动作备份。这样作的目的是节省备份所用的空间。
ufsrestore
所以可以指定从卷 1 开始搜索。恢复整个文件系统下例将一个老的文件系统(/opt)
移
到一个新的磁盘分区(/dev/rdsk/c0t3d0s5)中。首先,卸载老的文件系统并实施
备
份:
#umount /opt
#fsck /opt
#ufsdump 0uf /dev/rmt/0 /opt
其次,生成新的文件系统,将其安装到一个临时目录(/mnt),并实施恢复:
#newfs /dev/rdsk/c0t3d0s5
#fsck /dev/rdsk/c0t3d0s5
#mount /dev/dsk/c0t3d0s5 /mnt
#cd /mnt
#ufsrestore rvf /dev/rmt/0
#rm restoresymtable
最后,卸载新的文件系统,用 fsck 检查其一致性。
#cd / umount /mnt
#fsck /dev/rdsk/c0t3d0s5
选择性备份,备份指定的文件和目录;
tar
系统备份:tar -cvf 目标文件名/设备名 备份文件,例如:
tar -cvf backup.tar *
命令将当前目录下的所有文件(包括各级子目录)都打包在 backup.tar 文件中。
tar -cvf /dev/rmt/0 *
命令将当前目录下的所有文件(包括各级子目录)都打包到磁带上。查看 tar 文件的
内
容:tar tvf 目标文件名/设备名,例如:
tar -tvf backup.tar
tar -tvf /dev/rmt/0
将 tar 文件中的内容恢复到指定目录中去:tar xvf 目标文件名/设备名 [目录名],例
如:
tar -xvf backup.tar /home
tar -xvf /dev/rmt/0 /home
如果不指定目录名则表示当前目录。
一、硬件安装
1、工作站关电后,将网卡妥善安装在一个 PCI 插槽中;
2、工作站上电,按 STOP and A 中断 boot process,到 ok 提示符;
3、输入命令 show-devs,显示系统配置,FORE 网卡的 device-pathname 应出现
在
配置列表中,形式可能如下:
/pci@1f,2000/FORE,PCA-200E@2
4、设备提供光口自环测试(media loopback)和内部自环测试(internal
loopback),
供检查设备及安装是否完好。根据经验用内部自环测试即可,方法:
输入命令 test /pci@1f,2000/FORE,PCA-200E@2
待出现:pass 0 说明硬件及安装都正确;
5、输入 boot 命令 ,启动系统。
二、软件安装
1、软件安装需要 root 权限;
2、网卡支撑软件一般是一个.tar 文件提供,解开后在其目录下有 8 个子目录,分
别为:
FORECore ForeThought ATM Core Software
FOREDrv ForeThought ATM Card Drivers
FORESpans ForeThought SPANS Signalling Software
FOREUni ForeThought UNI Signalling Software
FOREclip ForeThought Classical IP Software
FOREip ForeThought FORE IP Software
FOREmpoa ForeThought MPOA / LAN Emulation Software
FORExti ForeThought XTI Application Programming Interface
3、例如.tar 文件解开后在/home/FORE 下,则该目录下就有上述 8 个子目录,我们
要
用的程序在 FOREDrv、FOREip 下,但各个模块之间有一定的依赖关系,需要安装的
模块
有 6 个: FORECore、FORESpans、FOREDrv、FOREip、FOREUni、FOREclip。安装
过程:
Select package(s) you wish to process (or 'all' to process all packages).
(default: all) [?,??,q]:
选择要安装的模块,根据提示安装。
4、安装后的软件在/opt/FOREatm /bin (使用的配置命令所在目录)
/conf
/examples
/include
/lib
/man
三、网卡配置
1、网络接口名配置
>;configure_atm
选择配置 ip 模块,得到一个 ip interface 名,默认为 fa0。重启工作站,可以看到在
/dev 下有 fa0 接口,而网卡的设备名为 fatm0。
2、>;adinfo fatm0 可查询设备硬件信息
>;adconfig fatm0 可进行设备配置
>;adstat fatm0 可查询设备状态
这三个命令较少用到。
3、接口 ip 地址配置
ifconfig fa0 <internet address>; netmask <netmask>; broadcast
<broadcast>; up
4、IPOA 配置
atmarp -s hostname device vpi vci aal encapsulation(outgoing PVC 配置)
atmarp -l device vpi vci aal encapsulation (incoming PVC 配置)
例:分配给工作站的 pvc 为 vpi 0 vci 150
工作站的 IPOA 地址为 200.200.200.101
MUSA 设备的 IPOA 地址为 201.200.200.100
AAL 类型为 5
encapsulation 为 llc_routed
>;atmarp -s 201.200.200.100 fa0 0 150 5 llc_routed
>;atmarp -l fa0 0 150 5 llc_routed
[在 MUSA 设备上要做:add nms、act nms、add route、add atm arp、add
ipaccess]
>;ping 200.200.200.101 如果 ping 通,则已配置成功。
23 Q: Solaris 启动过程是如何的?启动的时候读那些文件启动一些服务比如我要在
系
统启动的时候自动启动 Apache(httpd)服务,应该在哪个文件里面配?
A: Solaris 的启动是典型的 ATT UNIX 启动过程, 在普通的 UNIX 书记和 SUN 公司的
文
档中都有详细的介绍,这里就不详谈了. 要点室内核引导后启动 init 进程, init
按照/etc/inittab 的控制加载各子系统, 一般是执行 /etc/rc* 之类的脚本.
这些脚本再执行 /etc/rc*.d/ 下的脚本,其中 /etc/rc2.d/S72inetsvc 运行
inetd, 该后台进程根据/etc/inetd.conf 控制网络服务,所以要自动启动
Apache,需要在 inetd.conf 中修改或增加 80 端口的启动命令。(如果不是用 80
,还要修改/etc/services 文件)
24 Q: 有一个问题要请教一下,谢谢!
一台 SUN 服务器,更换 IP 地址。
原来地址为 10.11.43.137,现在更换为 10.108.22.247
我的操作步骤如下:
1:修改/etc/hosts 文件,修改后的文件内容如下:
127.0.0.1 localhost
10.108.22.247 westsnow loghost SYBASE
10.109.22.247 eastsnow
/etc/hostname.hme0 文件内容:
westsnow
/etc/hostname.hme0:1 文件内容:
eastsnow
2:修改/etc/netmasks 文件,修改后的文件内容如下:
10.0.0.0 255.255.0.0
3:修改网关/etc/defaultrouter 文件,修改后的文件内容如下:
10.108.22.1
26 Q: 如何在脚本里实现修改用户口令?
A: 由于修改口令需要从终端读取用户口令,所以不能用重定向的办法,但可以采用
expect 之类的工具,这些工具建立一个伪终端来模拟输入, 所以起到用脚本控
制终端的效果.
33 Q: 如何得到和设置操作系统内核参数。
A: 通常,这些参数在 /etc/system 中配置。
39 Q: 我的工作站上没有光驱,想通过远程安装,可否?
A: 可以,有两种方式:
1。 将 solaris 光盘内容以 ftp 上传,本地安装
2。 做一个 install server ,远程直接安装。
3. 用 remote 光驱安装
(在 remote 机器)
# ps -ef | grep nfsd
# mkdir /dummy
# vi /etc/dfs/dfstab (share -F nfs -o ro /dummy)
# eject cdrom0
# chmod 644 /etc/rmmount.conf
# vi /etc/rmmount (share cdrom*)
# chmod 444 /etc/rmmount.conf
# (Load a CD.) share
- /dummy ro ""
- /cdrom/sol_7_sparc/s5 ro ""
(在本地)
$ showmount -e starbug
# mount -F nfs -o ro starbug:/cdrom/sol_8_sparc /cdrom
$ ls /cdrom
$ <install software>;
41 Q: 我在/etc/skel/local.profile 作的环境变量的修改但没有在新增用户时候得到
验证,为什么?这不是一个模板吗?(用 EXIT 退出窗口, 再用新用户登录)
A: 如果是从终端登录,.profile 会起作用,但如果从 CDE 登录,则系统执行
.dtprofile,要想执行 .profile, 还要修改 .dtprofile 一般情况下,如果想设
置一个环境变量使其对所有用户生效,可以修改 /etc/profile
44 Q: 原来的系统中/usr 与 / 在同一个硬盘分区上,由于安装了许多软件,此分区已满
,现在系统增加了硬盘,如何将/usr 目录挪到新的硬盘上?
A: 1.在新的硬盘上将文件系统建好,
2.mv /usr /usr.bak
3.mkdir /usr
4.mount newdriverpath /usr
5.cp -r /usr.bak /usr
6.修改/etc/vfstab 文件.
45 Q: 运行下面这段程序并用 vmstat 观察内存的使用情况:
int main(){
int *p[100];
int c;
printf("before new!";
c=getc(stdin);
for(int i=0;i<100;i++)
p=(int *)malloc(sizeof(int)*32000);
printf("after new!";
//1.....
c=getc(stdin);
for(int i=0;i<100;i++)
free((void *)p);
printf("after delete!";
//2......
c=getc(stdin);
return 0;
}
发现在 2 处系统的空闲内存块并没有增加,free 调用到底有没有释放内存?
A: malloc 调用引起进程堆空间增长,但 free 调用不会导致该堆空间立即缩小,
系统只是简单记录这一变化,就继续运行程序,只有系统出现内存短缺时,
系统才收集这些内存块重新分配,这样实现是为了减少系统开销,提高效率.
简化/etc/syslog.conf,我是这样测试的:
# /usr/lib/newsyslog
# logger -p deamon.notice "12345"
# cat /var/adm/messages
结果正常.
48 Q: Solaris 8 中,为什么不可以用如下命令给网卡增加逻辑地址?
ifconfig hme0:1 xxx.xxx.xxx.xxx up
A: Solaris 8 对 ifconfig 作了一些改动,在这个命令之前,先执行下面的命令就可
以了: ifconfig hme0:1 plumb
50 Q: 如何在一台机器里如何实现用多块网卡容错?
A: Solaris8 新增了一个 daemon 叫 mpathd 将网卡管理分组管理来完成这样的功
能.
原理是给每个网卡分配两个地址,多出的一个逻辑 IP 地址由 mpathd 用来检查个网
卡的工作情况.下面一两块网卡为例介绍配置过程,这里两块网卡分别是 hme0 和
hme1,
1. ifconfig hme0 group test
ifconfig hme1 group test
2. ifconfig hme0 addif 19.16.85.21 netmask + broadcast + -failover
deprecated up
ifconfig hme1 addif 19.16.85.22 netmask + broadcast + -failover
deprecated up
3. 检查 hme0:1 和 hme1:1 看是否有逻辑 IP
ifconfig hme0:1
ifconfig hme1:1
这里要注意,给网卡增加的逻辑 IP 应当与实际分配的 IP 地址在同一个网段并
且不能与网上其他主机 IP 地址冲突.
51 Q: 一个进程里最多可以打开多少文件?
A: 操作系统为每个进程维护一个所打开文件的数组,进程能够打开的文件与此数组
的大小有关.此数组的大小由两个系统变量限制: rlim_fd_max , rlim_fd_cur,
这两个变量可以用 limit 或 ulimit 命令察看和修改,要扩大 rlim_fd_max 需要
root 权限,rlim_fd_cur 不能超过 rlim_fd_max. 编程时则有库函数 getrlimit
和 setrlimit 可以使用. 另外一种改法是在 /etc/system 文件中修改. 如果是
调用 stdio 函数打开文件,则还有另外一种限制,32 位内核 Solaris 的 FILE 结构
中的 文件句柄是一个字节,所以同时打开文件的上限是 256
52 Q: 如何改变登录 CDE 时的语言环境?
A: 修改/usr/dt/config/Xconfig 文件中的变量 Dtlogin*language 即可.
57 Q: 怎么样让系统启动时就自动在一个网卡上绑定两个 IP 地址
A: 创建文件 /etc/hostname.hme0:1,其中写上第二个 ip 地址.
62 Q: 我用 msgget 建一消息队列:
ret = msgget(IPC_PRIVATE, (0660)|IPC_CREAT);
在一个线程用 msgsnd 发消息,另一个 msgrcv 收:
ulReturnCode = msgsnd( QueueID, pBufferAddr, 8 ,IPC_NOWAIT);
当消息队列中的消息个数等于 40 时(每个消息尺寸为 8 字节),msgsnd 函数返
回-1,errno= 11,请问是什么原因。是消息队列满吗?怎样调整系统参数,使
消息队列能大些。
A: msgmap : 100 maximum size of resource map for messages
msgmax : 2048 maximum size ,in byte, of a massages
msgmnb: 4096 maximum number of bytes on a message queue.
msgmni: 50 maximum size of message queue identifiers.
msgssi: 8 message segment size.
msgtql: 40 maximum number of message headers
msgseg: 1024 maximum number of message segments.
65 Q: 请问用什么命令可以确定是否有磁带设备?多谢。
A: 看一下 /dev/rmt 如果是空就没有.
.
66 Q: 在 solaris 8 下安装 Forte Developer 6 到达:
installing Forte C++ Entep Ed 6/SPARC
installing Forte Developer 6
时死掉应如何解决
A: 在安装之前,应当清除所有以前安装时添加进系统的 package.
另外,不用缺省目录 /opt , 换一个新建的空目录也有效.
68 Q: 在输入用户名后启动很慢,有时甚至进不了,停在启动画面,不知如何解决(我用
过 fsck,也不好使,有没有更好的办法)!能否重装操作系统,而不影响现有的已装
软件.谢谢!
A: 一般说来, 这与家目录下配置文件有关.新建一个用户试一试.
71 Q: 我们的技术支持人员遇到一个问题,向您请教:在安装时没有选择安装网络,
76 Q: 请问:如何设置工作站的最大客户端数?现有一台测试用机,使用人较多,
经
常出现"无法得到 pty"的提示。
A: 在/etc/system ,可以用参数 maxusers 设置,最大 2048,如果这里没有设置,默
认为与系统内存容量相同(以 M 记,最大为 1024),
78 Q: 贵处有无磁带机的使用手册或指导说明?
A: answerbook 中系统管理员手册 I 有使用说明.
answerbook 的文档不是 html 格式,需要一个服务器程序转换, 察看本机 http 进
程看有没有下面这个:
80 Q: shell 文件中如何从文件中读参数?
A: cat yourfile`
84 Q: 具体问题是:有一个进程不停的向该文件增加内容,同时另外一个进程建立
了
与该文件的管道,从该文件中读取一行记录进行处理。然后删除该行记录。因
此需要保持该文件 i-node 不能改变,否则,向该文件写的进程就不能将信息写
入该文件了。有没有解决方法,请指教。
A: I don't know if I have understood you :
If you want save this file for later use, you should not remove its'
content,if you don't need these content, you don't need this file as
well, you can use pipe only, or other interprocess communication
methods.
请问此问题是怎麽回事?如何解决?
A: 权限问题, 检查一下 /dev/kbd 读写权限
88 Q: 在 CSH 下我输入以下命令?
$setenv IWAVE 'pwd'
$echo $IWAVE
结果显示为:pwd
在我的理解中应该是将 pwd 的输出(如/tmp)赋值给变量 IWAVE,所以我想象的
输出是/tmp
A: use ` instead ' apparently,they are different. read some unix books
for reference
89 Q: 为什么有时普通用户不能登录 CDE?
A: 这个错误可能是由于 CDE 的不正确设置造成的。在每一个用户的 home 目录下有
一
个.dt 子目录.在此目录下有一个 errorlog 文件记录了 CDE 登录失败的原因.查
看此文件可以找到失败的原因.一个可行的方法是:使用 root 登录并且删除对
应用户 home 目录下的.dt 目录,同时可以删除<home>;/.dtprofile 文件, 然后使用
用户口令登录即可.外检查/usr/dt/bin/dtsessoin 的使用权限.正确的权限应
当是-r-sr-xr-x
93 Q: 求助--请教一个多线程编程问题。关于我们发现的问题具体现象如下:
函数 void* A(void *pInput)
{
char szBuf[30000]; //this buffer maybe larger than 30,000
...
...
}
在多线程程序中,该函数在 main 中运行(此时相当于在主线程中运行)正常。
如果使用 pthread_create 创建一个线程,以 A 作为线程入口函数,用内存测试工
具 purify 可以观察到该线程运行过程中出现 Beyond Stack Read、Beyond Stack
Write 错误。如果把 szBuf 改为堆中分配的内存,则无此问题。据此,我们判断
是线程的栈空间溢出造成该问题。按资料描述,主线程的缺省栈空间大小为 8M
,子线程缺省栈空间为 2M;我们使用 pthread_attr_setstack 函数将子线程的栈
空间设置为 8M,但仍未解决问题。后又将线程属 性设置为
PTHREAD_SCOPE_SYSTEM, 问题仍然存在。函数 A 以静态库方式由第三方提供,
我们现需要使之在一个子线程中运行,因此希望能够提供主线程与子线程差异
的资料,除堆栈空间、调度方式外,是否还有其他差别,造成以上错误的发生
A: In fact, there is no problem in the program. I think there is a bug
in their debug tool: purify. You can use dbx to debug your program.
94 Q: 请问一块硬盘上可以有两个 Solaris 分区吗?在一块硬盘上分了两个 solaris
分
区,一个是 active 的系统安装分区,另一个是后来用 fdisk 创建的,请问怎样把
第二个分区加入到 solaris 系统中使用。谢谢。
A: Yes, There can be up to six partitions in a disk. you can see the
partition using utility format. Command list:
#format
Then you will see the disks installed in you system.then select the
disks you are interested in. then print "partition" and then "print"
to see the partition information. The partition you want to add to
the system can be identified as c#t#d#s#. Make sure the mount point(
a empty directory in file system). such as /disk1.then run the
command:
#mount /dev/dsk/c#t#d#s# /disk1
根分区太小,已经满了,可以使用工具动态改变吗?
A: No, If you want to modify it, the whole disk data will be lost.
In fact, I think it high time for you to re-instal the solaris
system. In the new installation. You really need just two partitions
swap and root. Leave no more than 1G to swap partition and all the
left to root.Don't forget to backup all you data before re-installation.
96 Q: 用 CC 编译器如何实现结构成员按字节对齐,类似于其他编译器的#pragma
pack(1)
功能。
A: It is a standard compilation option(#pragma pack). It is also
supported in Solaris C.You can get documents about SC options from
http://sunlibray under workshop directory.
97 Q: 为什么 SUN 的本地界面有时候会出现死掉的情况,此时 kill 掉用户的
dtsession
是否就可以恢复正常。如不能恢复正常还需要做那些操作。
A: In my experince, the interface dying, may be caused by other
application other than dtsession. You should determine which
program's interface causes the interface dying. This situation is not
often happens, and most of them happened when you are manipulating
a
program's interface by mouse. When it happen, login the system from
network as "root" or the account which cause the dying, kill the
program.
98 Q: 系统不能启动, 任何二级目录都没有了,但用户下,所有命令都不能用,怎么
安装 Solaris,能直接从光盘启动吗?
A: You harddisk is damaged. It may be salvaged manually, or can not.
You should restall the system. Or even worse, you should change your
harddisk.
99 Q: Can you tell me if I want to add a new CPU chip to a only one CPU
chip machine on solaris system,Can the application run continually in
the old cpu chip without interruption on solaris system ?
A: Please tell me the machine's type. If your machine is a workstation.
CPU chips can not be added without turning down the power. I don't
know so much in this field. But, I have forwarded this message to the
specitest in our company. You will get much more detailed answers.
But you should wait several days. Another way for you is to consult
the vender who sell you the machine directly.
请问是什么意思,难道编译器还要 assert 吗?
A: CC 编译器要求被编译的文件以两个新行结束,请在相关头文件末尾加上新行。
105 Q: 我的工作站的交换分区分的太小了,除重装系统外,是否有其它办法将空间
调
整一下。
A: You can extend your swap region by issueing the following command:
#mkfile <filename>; -m <size in million>;
#swap -a <filename>;
Note: the <filename>; should be the full path name.
111 Q: In solaris 2.6. when i use command "killall" ,all process started in
CDE will be killed and the eviroment will change to CDE login. I
looked up the man manual about "killall" ,it told me that "only root
can use the command".But I really use it with common id.In
solaris7 and solairs 8, with common id,i can't use the common.can
you tell me why i can execute "killall" successfully in solaris 2.6?
A: Just see the access mode of /usr/sbin/killall. If you can use it
with a common account identity, the access mode should be x-rsx-rx-r.
If you can not use it in a common account identity, the mode should
be x-r--r--r. You can change the mode as you like, whenever in 2.6,
or 2.7 or 2.8.
A: 导致问题出现的原因是,由于客户机在申请原来的被保留分配的 IP 时,服务器
发现这个 IP 不能够被使用(已经有其它机器使用了这个 IP 地址)。使客户机申
请失败,并且使其中的某些进程不能正常退出,继续占用了端口 4999 而使后面
的申请不能进行。办法是找到占用端口 4999 的进程,杀掉即可。找到这个进程
的办法是,这个申请进程是带有 dhcp 字样的。
# ps -e | grep dhcp
会出现一到两个进程号。验证这些进程是否占用了 4999 是看进程打开的文件:
# /usr/proc/bin/pfiles #pid
早到进程然后杀掉。这样就可以继续启动 Client 端的 dhcp 申请。注意,修改
服务器的设置使新的申请可以成功。
# df -k
Filesystem kbytes used avail capacity Mounted on
/proc 0 0 0 0% /proc
/dev/dsk/c0t0d0s0 1258491 51942 1143625 5% / /dev/dsk/c0t0d0s6
1612343 500741 1063232 33% /usr
fd 0 0 0 0% /dev/fd
/dev/dsk/c0t0d0s3 33099 9211 20579 31% /var
/dev/dsk/c0t0d0s7 13550703 838475 12576721 7% /export/home
/dev/dsk/c0t0d0s5 30743 10319 17350 38% /opt
/dev/dsk/c0t0d0s1 548687 369368 124451 75% /usr/openwin
swap 627864 563360 64504 90% /tmp
# cd tmp
# ls
ps_data
# ls -a -l
total 98
drwxrwxrwt 6 sys sys 443 May 7 15:29 .
drwxr-xr-x 22 root root 512 Mar 20 17:45 ..
drwxrwxr-x 2 root root 176 Feb 27 23:18 .X11-pipe
drwxrwxr-x 2 root root 176 Feb 27 23:18 .X11-unix
drwxrwxrwx 2 root root 179 Feb 27 23:18 .pcmcia
drwxrwxrwt 2 root root 327 Feb 27 23:18 .rpc_door
-rw-rw-r-- 1 root sys 5056 Feb 27 23:18 ps_data
# cd .pcmcia
# ls -a -l
total 32
drwxrwxrwx 2 root root 179 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:35 ..
prw-rw-rw- 1 root root 0 Feb 27 23:18 pcram
# cd ..
# pwd
/tmp
# cd .rpc_door
# ls -a -l
total 32
drwxrwxrwt 2 root root 327 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:36 ..
Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.1
Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.2
Drw-r--r-- 1 root root 0 Feb 27 23:18 .rpc_100029.3
# cd ..
# cd .X11-pipe
# ls -a -l
total 32
drwxrwxr-x 2 root root 176 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:37 ..
-rw-rw-rw- 1 root root 0 Feb 27 23:18 X0
# cd ..
# ls
ps_data
# cd .X11-unix
# ls -al
total 32
drwxrwxr-x 2 root root 176 Feb 27 23:18 .
drwxrwxrwt 6 sys sys 443 May 7 15:38 ..
srwxrwxrwx 1 root root 0 Feb 27 23:18 X0
等待您的回答,谢谢