22、Unix 系统启动、关闭及故障排查全解析

Unix 系统启动、关闭及故障排查全解析

1. Unix 系统关机基础

在管理 Unix 系统时,正确关机至关重要。Unix 提供了 shutdown 命令来完成关机操作。该命令会向所有登录用户发送一系列定时消息,提醒系统即将关闭,发送最后一条消息后,会将所有用户注销并使系统进入单用户模式。所有 Unix 系统,包括运行在 PC 硬件上的系统,都应使用相应命令关机,以确保文件系统完整性和系统服务的正常终止,切勿直接关闭电源。

shutdown 命令主要有两种变体:
- System V 版本 :用于 Solaris 和 HP - UX(HP - UX 稍有修改)。
- BSD 版本 :用于 AIX、FreeBSD、Linux、Solaris(在 /usr/ucb 中)和 Tru64。

此外,部分系统还提供 telinit 命令,可快速关机( telinit S )、停机( telinit 0 )或重启系统( telinit 6 )。

2. System V 关机命令
  • Solaris 系统 :标准的 System V shutdown 命令格式如下:
# shutdown [-y] [-g grace] [-i

相关推荐

Linux关机重启原理:从shutdown命令到内核reboot调用全链路解析

关机与重启是操作系统最基础也最易被误解的系统行为,其本质是受控的系统状态迁移过程。它依赖init系统(如systemd或SysVinit)协调服务停止、文件同步、设备卸载,并最终触发内核reboot()系统调用。理解这一原理,有助于规避生产环境中常见的数据丢失、服务异常中断及权限失控问题。技术价值体现在安全运维、故障定位与跨环境适配——尤其在WSL、Kali Live、嵌入式Linux等特殊场景下,标准命令行为差异显著。本文深入解析shutdown与reboot的真实执行路径、权限拦截机制(polkit/s

weixin_34124651的博客 431

Trae集成Claude-Mem避坑指南:MCP协议断层与上下文生命周期解析

MCP(Model Context Protocol)是AI原生IDE中实现模型上下文协同的核心协议,其本质是一套定义context.read/write/list等JSON-RPC方法的轻量级通信规范。当前MCP v0.3标准虽已发布,但客户端(如Trae IDE)、服务端(如mcp-server-go)与CLI工具(如codex-cli)在协议版本解析、认证机制、序列化格式上存在严重不兼容,导致‘连接失败’‘静默无响应’等高频问题。技术价值在于打通本地开发环境与AI记忆能力的链路,支撑团队级上下文共享、

weixin_34067102的博客 394

Void Linux深度解析:runit、xbps与musl如何重构系统确定性

Linux发行版的核心价值正从‘功能丰富’转向‘行为可预测’。初始化系统(如runit替代systemd)、包管理机制(xbps的显式依赖与构建哈希)和C标准库(musl libc的ABI稳定性)共同构成系统确定性的三大支柱。这类设计显著降低嵌入式设备启动抖动、提升安全审计可验证性、保障交叉编译环境100%可重现。尤其在边缘计算、工业控制与合规敏感场景中,确定性直接转化为启动延迟下降74%、内存占用压缩68%、OTA失败率降低至0.2%等量化收益。本文以Void Linux为典型范例,深入剖析其放弃syst

weixin_30561425的博客 404

Ubuntu零基础入门到精通【4.6讲】:Ubuntu 截图、录屏与剪贴板工具 - 从入门到工程实践

🏆 本文收录于 《滚雪球学 Ubuntu》 专栏。 本专栏面向有一定计算机基础,但尚未系统学习 Linux / Ubuntu 的读者,采用“滚雪球式学习法”:先装好、再会用、再理解、再优化、再实战,带你从第一次进入 Ubuntu 桌面 / 终端开始,逐步掌握 Ubuntu 的日常使用、命令操作、软件安装、系统配置、开发环境搭建与服务器部署能力。

**My Coding Family** 1728

AEB(自动紧急制动)

AEB系统对静止物体的误判率受多种因素影响,包括传感器精度、算法复杂性以及环境条件等。通过多传感器融合、算法优化、硬件升级以及环境适应性增强等技术手段,可以有效减少误判问题。美国和欧洲的AEB法规均强调了技术性能和安全性,但具体要求有所不同。美国的NHTSA规定更注重高速和复杂场景下的紧急制动能力,而欧盟的ECE R152法规则更侧重于基础的AEB功能覆盖范围。

百态·数智思维 | 聚焦大数据、量化与未来AI 2559

雷达信号处理DDC数字下变频

由于接收到的雷达信号频率较高,不能对其进行直接采样并数据处理,所以需要对雷达信号进行预处理,在降低其采样率的同时,将其由中频降低到低频,然后对输出的基带信号进行后续的解析,以便于获取雷达信号的特征参数。 本文采用数字正交下变频,将单通道信号转化为正交双通道信号,数字下变频(DDC)的原型为模拟下变频,通过对窄带雷达信号或单频信号进行数字混频,然后对信号进行正交采样,提取 I、Q 两路正交分量,最后通过滤波去除信号中的高频分量,将信号由中高频搬移至低频。 模拟下变频的系统框图如下: 其数学推导.

qq_44033461的博客 5257

EGO-Planner文章解读(一)——论文原理和算法实现

详细解读egoplanner论文和代码

fegxg的博客 4012

使用Android GPS api 实现一个轨迹记录的小功能

引入 市场上的跑步软件已经是非常多了,如咕咚和悦跑圈还有其他,很多大厂也在涉足这个方面。而最简单的运动跑步,最近几年也因简单,不限场地,运动效果出众备受大众喜欢。 我的这篇文章的内容很多也是从网上学习其他的博客内容,外加利用android自身的提供的api实现的,希望能对有这方面需求的朋友有所帮助。 介绍 先上两张图,界面比较丑,不过一些数据基本都有了,这个图片是临时要用截取的,所以轨迹线很短,之前

尝试着去了解代码 1万+

别再为OpenBCI_GUI安装发愁了!保姆级教程带你从Processing配置到成功运行(附常见错误解决)

本文提供了一份详细的OpenBCI_GUI安装教程,涵盖从Processing配置到成功运行的全过程,特别针对常见错误提供了解决方案。通过环境搭建、软件依赖安装、源码处理及首次运行实战,帮助用户高效完成数据可视化工具的部署与使用。

weixin_28366475的博客 278

海思HiMPP开发避坑指南:MMZ内存与系统内存傻傻分不清?一个例子讲透

本文深入解析海思HiMPP开发中MMZ内存与系统内存的关键差异与应用场景,帮助开发者避免常见的内存混淆问题。通过实际案例和性能对比,详细介绍了MMZ内存的特性和优化策略,提升多媒体处理效率。

weixin_30772105的博客 475

【图像增强】论文精读:Correlation Matching Transformation Transformers for UHD Image Restoration(UHDformer)

论文题目:Correlation Matching Transformation Transformers for UHD Image Restoration —— 用于UHD图像恢复的相关匹配变换变压器AAAI 2024!本文提出了一种用于超高清(UHD)图像恢复的通用变压器UHDformer。UHDformer包含两个学习空间:(a) 高分辨率空间中的学习,(b)低分辨率空间中的学习。前者学习多层次的高分辨率特征,融合低层特征,重建残差图像,后者从高分辨率特征中学习更多的代表性特征,以促进更好的恢复。

主要更新底层视觉(去噪、超分等)相关的科研内容,形式为【论文精读】+【论文复现】 302

LPDDR5 物理层一致性测试(连载・下):电平、过冲下冲与 Rx 接收眼图 Mask 掩模完整指标解读

本文系统梳理LPDDR5物理层一致性测试全流程,涵盖差分/单端电平、边沿斜率、交叉点电压、过冲下冲及CS/CA/DQ接收眼图掩模(Rx Mask)测试,详解各参数定义与工程实操要点。强调配置需与DRAM MR寄存器同步,突出差分≠合格、面积积分不可忽视、掩模失败优先排查参考电压与信号完整性等高频坑点,为硬件调试与SI工程师提供权威参考。

一只豌豆象的博客 101

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 21、Unix系统启动、关机及脚本定制全解析
下一篇: 23、计算机故障排除与TCP/IP网络基础
vim8coder
博客等级 码龄1天 0粉丝 1693原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值
⌂ 换网址