zoukankan      html  css  js  c++  java
  • mac os lscpu 【转】

    CPU Information on Linux and OS X

    This is small blog post detailing how to obtain information on your CPU on Linux and Mac OSX. These commands give information such as the instruction set of the processor, the type of processor, the number of cores, number of CPUs, information about the caches etc.

    Linux :

    In Linux, the “proc” file system  is providing most of the important information on the system. It interfaces with the kernel to obtain these information and is mounted as “/proc” on most of the Unix machines. More information can be found here.

    The command to obtain information is this one.

    If using GCC to compile C programs, you might want to use the “-march=cpu-type” to optimise your compilation to your type of processor and it’s set of instructions, to do that you can use use the following command :

    Another useful command on multiple linux distributions is this one :

    The command try to display information on your CPU in a human readable format but do not include all the information available.

     OS X  :

    On OS X mountain lion and probably some other versions, the commands to use are a bit different, some general information about the system can be found by using the “system_profiler” command. This command includes some simple information on the system in use:

    However more dedicated information can be found by using the “sysctl” command which is an interface to dynamically change system variables and obtain detailed informations on the system. This command is also present on BSD systems.

    This command will give you the following type of output :

    As  you can see, the  command is displaying  specific informations such as the instruction set supported by your processor amongst many other information. For more information on the sysctl command use RTFM.

    Have fun.

  • 相关阅读:
    《Microsoft SQL Server 2008 MDX Step by Step》学习笔记九:导航结构层次
    windows live messenger 2009登录失败,提示“错误代码:81000605”的一个解决办法
    《Microsoft SQL Server 2008 MDX Step by Step》学习笔记七:执行聚合(上)
    Java反编译插件Jdclipse导致Eclipse 3.7.2启动崩溃的解决方法
    关于婚姻,你能事先回答这些问题吗?(来自网络)
    邀月的一些其他随笔索引
    《Microsoft SQL Server 2008 MDX Step by Step》学习笔记十一:计算成员和动态命名集
    一点一滴培养你的领袖气质,要经常自我激励(转自网络)
    Firefox中卸载Java Console
    Jquery.Validate验证CheckBoxList,RadioButtonList,DropDownList是否选中
  • 原文地址:https://www.cnblogs.com/bonelee/p/8470044.html
Copyright © 2011-2022 走看看