timedatectl
是一个管理日期和时间的工具,可以用来永久设置系统时间和时区。
1 | sudo timedatectl set-time "2024-10-26 19:12:19" |
如果发现时区也不正确,可以用下面的命令设置时区:
1 | sudo timedatectl set-timezone "Asia/Shanghai" |
例如,将时区设置为中国标准时间 (CST, UTC+8),时区名称需要使用 timedatectl list-timezones
查看可用的时区列表。
1 | df -h . |
deep为1
1 | du -h -d . |
1 | # thi |
ps aux linux command whill show no zero cpu usage when the process is sleeping beacuse of its snapshots mechanism
1 | dpkg: 处理归档 /var/cache/apt/archives/bat_0.12.1-1build1_arm64.deb (--unpack)时出错: |
1 | sudo apt-get purge -h |
tree -L DepthSIze Folder_Path
1 | #分析symbols |
综合来看,使用 nm -gDC <filename>
命令可以查看一个二进制可执行文件或者共享库中的全局符号表和动态符号表,并将包含其中的 C++ 符号名还原成源代码中的名称。
1 | shaojiemike@snode6 ~/github/gem5 [10:49:56] |
It is all started with two confusing situation.
ps aux | grep -v process_name
, the process is in Sl+
state. But the cpu usage is not zero.watch "ps aux |grep 3496617"
always show the same cpu usage percentage, which is very confusing beacause htop
always show up-down value. and pidstat -p 3516617
show cpu% less than 100%.https://cloud.tencent.com/developer/article/1448642
1 | shaojiemike@snode6:~$ groups shaojiemike |
1 | cat /etc/group |
/etc/passwd
如果发现自己不在/etc/passwd里,很可能使用了ldap 集中身份认证。可以在多台机器上实现分布式账号登录,用同一个账号。
1 | getent passwd |
1 | ctrl + alt + F3 |
宕机一般是爆内存,进程分配肯定会注意不超过物理核个数。
在zshrc里写入 25*1024*1024 = 25GB的内存上限
1 | ulimit -v 26214400 |
当前shell程序超内存,会输出Memory Error
结束。
1 | with open("/home/shaojiemike/test/DynamoRIO/OpenBLASRawAssembly/openblas_utest.log", 'r') as f: |
有文章说Linux有些版本内核会失效