SCO UNIX账户和进程管理_VMware, Unix及操作系统讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  VMware, Unix及操作系统讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2048 | 回复: 0   主题: SCO UNIX账户和进程管理        下一篇 
leixianp
注册用户
等级:新兵
经验:57
发帖:64
精华:0
注册:2011-7-26
状态:离线
发送短消息息给leixianp 加好友    发送短消息息给leixianp 发消息
发表于: IP:您无权察看 2015-6-19 10:20:12 | [全部帖] [楼主帖] 楼主

(1).系统profile和用户profile
用户进入系统时,首先执行系统的profile文件,再执行每个用户自己的profile。

系统profile文件为/etc/profile(Bourne shell、Korn shell),/etc/cshrc(C shell)。

每个用户的profile为$HOME/.profile。

(2).shell启动文件
当创建新用户时,系统根据选择的登录shell为用户创建profile,相应的模板文件如下:

Bourne shell:/usr/lib/mkuser/sh/profile;


C shell:/usr/lib/mkuser/csh/cshrc和/usr/lib/mkuser/csh/login;

Korn shell:/user/lib/mkuser/ksh/kshrc、/user/lib/mkuser/ksh/profile。


(3).在用户下禁止普通用户登录
1、对于sh和ksh:

修改/etc/profile,在umask 022后增加:

if [ "LOGNAME" != "root" ]
then
clear
echo "System is unavailable"
exec /bin/true
fi


2、对于csh:

修改/etc/cshrc,在umask 022后增加:

if ( "LOGNAME" != "root" )
then
clear
echo "System is unavailable"
exec /bin/true
endif


(4).nohup使用
nohup可以使进程在注销后仍能继续执行,格式如下:

nohup command [ arguments ]


(5).sar的使用
sar有两种命令行格式:

第一种:

sar [ options ] [ -A ] [ -o file ] t [ n ]


其中t为采样间隔,n为采样次数。-o表示把结果以二进制形式存放在file文件中。

第二种:

sar [ options ] [ -A ] [ -s time ] [ -e time ] [ -i sec ] [ -f file ]


-s time和-e time表示报告的起始时间和结束时间,-i sec表示在sec秒的间隔选择纪录。若没有指定-i选项,则从-f指定的纪录文件中抽取数据,缺省文件是/usr/adm/sa/sadd(dd为日期号)。

选项作用如下:

-A:所有报告总和;
-a:文件读、写报告;
-B:报告附加的buffer cache使用情况;
-b:buffer cache使用情况;
-c:系统调用使用报告;
-d:硬盘使用报告;
-g:有关串口I/O情况;
-h:关于buffer使用统计数字;
-m:IPC消息和信号灯活动;
-n:命令cache;
-p:调页活动;
-q:运行队列和交换队列的平均长度;
-R:报告进程的活动;
-r:没有使用的内存页面和硬盘块;
-u:CPU利用率;
-v:进程、i节点、文件和锁状态;
-w:系统交换活动;
-y:TTY设备活动。
(6).设置系统日期和时间
asktime命令或date –t命令。

(1).应急盘的内容和制作
应急盘由boot软盘(引导盘)和root文件系统盘(根文件系统盘)组成。其中boot盘包含了引导和装入Unix系统核心所必须的三个文件:

/boot
/etc/default/boot
/unix


root盘包含了一部分的Unix系统的使用程序

制作方法:

scoadmin->Filesystems Floppy Manager,选择1;
或执行mkdev fd,选择1。
(2).包含vi工具
在root盘的制作过程中,执行如下命令:

<bootroot>cp /usr/bin/vi /mnt/usr/bin
<bootroot>mkdir –p /mnt/usr/lib/terminfo/a
<boot root>cd /usr/lib/terminfo/a
<bootroot>cp ansi /mnt/usr/lib/terminfo/a


(3).包含网络文件
在root盘制作过程中,执行如下命令:

<bootroot>cp /etc/services /mnt/etc/services
<bootroot>cp /etc/tcp /mnt/etc/tcp
<bootroot>cp /etc/slink /mnt/etc/slink
<bootroot>cp /etc/ifconfig /mnt/etc/ifconfig
<bootroot>cp /etc/inconfig /mnt/etc/inconfig
<bootroot>cp /bin/who /mnt/bin/who
<bootroot>cp /bin/ps /mnt/bin/ps
<bootroot>cp /usr/bin/telnet /mnt/usr/bin/telnet
<bootroot>cp /usr/bin/rlogin /mnt/usr/bin/rlogin
<bootroot>cp /usr/bin/ftp /mnt/usr/bin/ftp


(4).恢复root文件系统
使用boot和root盘引导后,对硬盘上的root文件系统进行操作:

fsck /dev/hd0root


检查root文件系统;

mount /dev/hd0root /mnt


安装root文件系统。

(5).解决“NO OS”故障
1、插入boot应急盘,重启动系统,出现Boot:提示时,键入:

hd(40) unix


2、进入单用户模式,键入:

#instbb hd /dev/hd0a
#dparam –w


instbb将引导块分区写给硬盘,dparam将主引导块代码写给硬盘。

(6).解决“boot not found“故障
表明系统/boot丢失了,恢复步骤:

1、插入boot应急盘,重启动系统,出现Boot:提示时,键入:

fd(60) Unix.Z root=hd(42)


2、进入单用户模式;

3、卸载/stand,/stand中有引导文件和内核,通常情况下,/stand在安装时设置为只读:

#umount /stand


4、重新安装/stand:

#mount /stand


5、安装软盘文件系统:

#mount –r /dev/fd0 /mnt


6、将root盘上的/boot拷贝到/stand目录中:

#cp /mnt/boot /stand


7、卸载软盘文件系统:

#umount /mnt


8、重引导系统。

(7).解决“Unix not found“故障
Unix文件丢失,可以在boot:提示符下输入unix.old或unix.safe等其他可代替的内核文件来启动。如果没有别的内核文件,从应急盘恢复的步骤如下:

1、插入boot应急盘,重启动系统,出现Boot:提示时,键入:

fd(60) unix.Z root=hd(42) swap=hd(41)


2、进入单用户模式;

3、卸载/stand:

#umount /stand


4、重新安装/stand:

#mount /stand


5、安装boot软盘文件系统:

#mount –r /dev/fd0 /mnt


6、恢复硬盘上的Unix文件:

#cp /mnt/Unix.Z /stand


7、卸载软盘文件系统:

#umount /mnt


8、重引导系统。

(8).解决启动挂起故障
/etc/init文件丢失。恢复方法:

1、插入boot应急盘,重启动系统,出现Boot:提示时按回车;

2、安装硬盘上的root文件系统:

#/etc/mount /dev/hd0root /mnt


3、拷贝init文件:

#cp /etc/init /mnt/etc/init


3、卸载硬盘:

#/etc/umount /mnt


4、重引导系统。
         

--转自北京联动北方科技有限公司




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论