linux 命令行串口监视_从Linux命令行进行监视

linux 命令行串口监视

System administration can be a time consuming and difficult job, and many web developers specifically assign these duties to a staff or contract sysadmin to insure servers are running optimally.

系统管理可能是一项耗时且困难的工作,许多Web开发人员专门将这些职责分配给员工或合同sysadmin,以确保服务器以最佳状态运行。

However, not every web business is economically ready to hire adminstrative staff and handle these tasks on their own. Second, not every web designer or developer has a sysadmin background and often learn on the fly.

但是,并不是每个网络业务在经济上都准备好聘请管理人员并自行处理这些任务。 其次,并非每个Web设计师或开发人员都具有sysadmin背景,并且经常在飞行中学习。

The command line can be intimidating, but also very convenient when duties require monitoring the performance of and controlling running processes on a server. For those who access their servers via telnet or secure shell (SSH), two command line functions are listed below which may assist you in your day to day oversight of web servers.

命令行可能令人生畏,但当职责需要监视服务器的性能并控制服务器上正在运行的进程时,命令行也非常方便。 对于那些通过telnet或安全外壳(SSH)访问其服务器的用户,下面列出了两个命令行功能,它们可以帮助您日常监视Web服务器。

Monitoring Performance

监控表现

The top and ps commands offer valuable insight into what is running on your server, and what resources are being used.

top和ps命令可提供有关服务器上正在运行什么以及正在使用哪些资源的有价值的见解。

The top tool (lots of info by typing man top on the command line) lists the top processes running and the resources they are using (CPU, RAM, space). The command has options for sorting results and is interactive, updating constantly.

顶部工具(通过在命令行上输入man top来获得很多信息)列出了正在运行的顶部进程以及它们正在使用的资源(CPU,RAM,空间)。 该命令具有用于对结果进行排序的选项,并且是交互式的,并且会不断更新。

The ps command provides a list of running processes along with which user initiated the process or service, resource usage and how long the process has been running.

ps命令提供了一个正在运行的进程的列表,以及用户启动了该进程或服务的列表,资源使用情况以及该进程已经运行了多长时间。

I tend to use ps -aux, which lists all running processes by all users including those without terminals (daemons that start with the server boot for example).

我倾向于使用ps -aux,它列出了所有用户(包括不带终端的用户)的所有正在运行的进程(例如,以服务器启动开头的守护进程)。

The list includes a process ID (PID) that is helpful if you need to stop a runaway process or identify a service running that is not authorized.

该列表包括一个进程ID(PID),如果您需要停止一个失控的进程或识别未经授权运行的服务,该列表将很有帮助。

The kill command uses the PID to stop (or kill) a process. Take note that the kill aborts a running process ungracefully, so be sure you want to halt the process or application prior to using it. Traditionally you need superuser rights to issue a kill command (or be the root user).

kill命令使用PID来停止(或终止)进程。 请注意,kill会不正常地中止正在运行的进程,因此请确保在使用进程或应用程序之前将其暂停。 传统上,您需要超级用户权限才能发出kill命令(或成为root用户)。

I have included a screen shot of the top command run on my OS X system as an example of the statistics provided. I often leave a terminal open with top running when manually monitoring a server for any extended period of time.

我提供了在OS X系统上运行的top命令的屏幕快照,作为提供的统计信息的示例。 在任何长时间手动监视服务器时,我通常都会使终端保持打开状态,并使其处于最高运行状态。

翻译自: https://www.sitepoint.com/monitoring-from-the-linux-command-line/

linux 命令行串口监视

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值