unit 7~8

第七单元

1.  什么是进程

进程就是系统正在做的事情

2.    进程状态

运行.休眠.停止.继续.结束.僵尸进程(进程已经关闭,但仍然占用内存)

3.图形中如何查看进程

gnome-system-monitor

4.如何用命令查看进程

ps 进程查看工具

-a         (只能看到前端运行的)

a   查看在shell中所有运行的进程

-x   不在shell重运行的进程

-u   查看进程用户

-l   显示进程的详细信息

-f   完全信息(full的缩写)

-e   显示系统中的所有进程

ps -aux | grep      进程关键字

ps ax -o %cpu,%mem,user,pid,comm(名字 ) 查看进程得某项信息

ps aux --sort +|-%cpu|%mem...        进程按指定方式排序

如 ps ax -o %cpu,comm --sort +%cpu      按顺序大小正向排列  (从小到大)

ps ax -o %cpu,comm --sort —%cpu      按顺序大小逆向排列  (从大到小)

5.   如何控制shell重进程的前后台调用

命令&           进程在shell后台运行

ctrl +z           把占用shell的进程打入后台停止

jobs           查看被打入后台的进程信息

fg job号           把指定进程调回前台

bg job号           运行后台停止进程

ctrl +c           关闭进程

6.如何用命令控制进程

1)信号

信号 1 reload进程

信号 2 ctrl +c 删除进程在内存中的信息

信号 3 内存中的鼠标信息清除 (ctrl+alt显示鼠标)

信号 9 强行关闭进程

信号 15 正常关闭进程

信号 18 开启停止的进程

信号 19 停止正在运行的进程

信号 20 ctrl +z把占用shell的进程打入后台停止

2)信号发起

kill    信号 pid             结束进程

killall     信号 进程名称        结束的所有带有进程的名称

pkill -u username            结束某个用户的所有进程

如  pkill -9 -u student 结束student用户的所有进程

7.用户登陆监控

w  查看当前使用系统的用户

w -f  查看当前使用系统的用户并显示使用地点

last  查看登陆过系统的用户

lastb  查看试图登陆但没有成功的用户

ifconfig eth0 查看用户id

8.top命令

u username   查看用户信息

k            信号

h            显示帮助

s   1       表示1秒刷新一下

m          切换显示内存信息

c          切换显示命令名称和完整命令行

第八单元

1.什么是服务?

service

服务就是在系统中运行的软件,这个软件主要是对外提供某项功能,那么我们把这一类软件叫做服务

2.服务管理,systemctl命令

systemctl    start   服务名称     开启服务

stop         关闭服务

restart         重启服务

reload         重新加在服务配置

status         查看服务状态

enable         设定服务开机启动

disable         禁止服务开机启动

list-dependencies                 查看服务依赖关系

list-units                 查看当前运行的所有服务

list-unit-files          查看服务的开机启动情况

set-default multi-user.target   开机不启动图形

set-default graphical.target           开机启动图形

例  systemctl start  ssyd

时间: 2024-08-07 00:18:02

unit 7~8的相关文章

mysqld服务启动失败, Failed to restart mysqld.service: Unit not found.

-bash-4.2# service mysqld restart Redirecting to /bin/systemctl restart mysqld.serviceFailed to restart mysqld.service: Unit not found. 并不存在 mysqld 的服务, -bash-4.2# -bash-4.2# chkconfig -list -list: unknown option -bash-4.2# chkconfig --list Note: Thi

10.23 linux任务计划cron10.24chkconfig工具10.25 systemd管理服务10.26 unit介绍 10.27 target介绍

- 10.23 linux任务计划cron - 10.24 chkconfig工具 - 10.25 systemd管理服务 - 10.26 unit介绍 - 10.27 target介绍 - 扩展 1. anacron http://blog.csdn.net/strikers1982/article/details/4787226  2. xinetd服(默认机器没有安装这个服务,需要yum install xinetd安装) http://blog.sina.com.cn/s/blog_46

CentOS 7 防火墙 出现Failed to start iptables.service: Unit iptables.service failed to load

错误信息如下: [root]# service iptables start Redirecting to /bin/systemctl start iptables.service Failed to start iptables.service: Unit iptables.service failed to load: No such file or directory.解决方法如下: 一直用CentOS 6 习惯了,一下没适应过来.防火墙配置后执行service iptables sav

GRU(Gated Recurrent Unit) 更新过程推导及简单代码实现

GRU(Gated Recurrent Unit) 更新过程推导及简单代码实现 RNN GRU matlab codes RNN网络考虑到了具有时间数列的样本数据,但是RNN仍存在着一些问题,比如随着时间的推移,RNN单元就失去了对很久之前信息的保存和处理的能力,而且存在着gradient vanishing问题. 所以有些特殊类型的RNN网络相继被提出,比如LSTM(long short term memory)和GRU(gated recurrent unit)(Chao,et al. 20

2 unit 4

###unit.4管理系统存储### ###1.分区划分 fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not contain a recognized partition table Buil

2 unit 5

###unit.5 LVM### ###1.LVM建立 1.划分物理分区并把分区id修改为8e [[email protected] ~]# fdisk /dev/vdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Device does not

(4.5.4)Android测试TestCase单元(Unit test)测试和instrumentationCase单元测试

Android单元和instrumentation单元测试 Developing Android unit and instrumentation tests Android的单元测试是基于JUnit的.可分为: 1.本地单元测试 - 可以在JVM上运行测试(速度快,优先考虑). 2.Instrumented单元测试 - 需要Android系统 Android的Gradle插件支持在JVM上执行Andr??oid单元测试.它使用特殊版本的android.jar(也称为 Android mocka

ABP领域层——工作单元(Unit Of work)

ABP领域层——工作单元(Unit Of work) 点这里进入ABP系列文章总目录 基于DDD的现代ASP.NET开发框架--ABP系列之12.ABP领域层——工作单元(Unit Of work) ABP是“ASP.NET Boilerplate Project (ASP.NET样板项目)”的简称. ABP的官方网站:http://www.aspnetboilerplate.com ABP在Github上的开源项目:https://github.com/aspnetboilerplate 通用

Karma install steps for unit test of Angular JS app

npm install -g karma npm install –g karma-cli Install the plugins (optional)           # Install plugins that your project needs:  npm install karma-jasmine karma-chrome-launcher --save-dev Run following command to do unit test:           C:\Users\Br

.NET MVC4 实训记录之四(Unit of work + Repository)

今日后开启进阶模式! 谈到MVC与EntityFramework,则不得不说一说事务与仓储(Unit of work + Repository). 仓储(Repository):领域对象集合.用于操作领域对象与数据库上下文(DbContext)的交互(在此不得不说一声,领域对象和数据库表对象还是有区别的.领域对象实际上是一组有业务关系的数据库对象的抽象.最简单的形式就是主表.关系表在同一个领域对象中进行定义.例如我们前几章看到的UserProfile,它即定义了用户信息,又定义了用户角色关系信息