Linux/Ubuntu2018. 5. 4. 18:09

PMIC가 있으면 소비전류를 모니터링 할 수 있을거 같은데



$ sudo apt-get install powertop

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following extra packages will be installed:

  libpci3

Suggested packages:

  cpufrequtils laptop-mode-tools

The following NEW packages will be installed:

  libpci3 powertop

0 upgraded, 2 newly installed, 0 to remove and 10 not upgraded.

Need to get 202 kB of archives.

After this operation, 538 kB of additional disk space will be used.

Do you want to continue? [Y/n]

Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main libpci3 armhf 1:3.2.1-3 [48.2 kB]

Get:2 http://mirrordirector.raspbian.org/raspbian/ jessie/main powertop armhf 2.6.1-1 [154 kB]

Fetched 202 kB in 1s (113 kB/s)

Selecting previously unselected package libpci3:armhf.

(Reading database ... 155355 files and directories currently installed.)

Preparing to unpack .../libpci3_1%3a3.2.1-3_armhf.deb ...

Unpacking libpci3:armhf (1:3.2.1-3) ...

Selecting previously unselected package powertop.

Preparing to unpack .../powertop_2.6.1-1_armhf.deb ...

Unpacking powertop (2.6.1-1) ...

Processing triggers for man-db (2.7.5-1~bpo8+1) ...

Setting up libpci3:armhf (1:3.2.1-3) ...

Setting up powertop (2.6.1-1) ...

Processing triggers for libc-bin (2.19-18+deb8u10) ...

$ powertop

PowerTOP v2.6.1 must be run with root privileges.

exiting...

$ sudo powertop

Cannot load from file /var/cache/powertop/saved_results.powertop

Cannot load from file /var/cache/powertop/saved_parameters.powertop

RAPL device for cpu 0

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

RAPL device for cpu 0

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Model-specific registers (MSR)                   not found (try enabling CONFIG_X86_MSR).

Cannot load from file /var/cache/powertop/saved_parameters.powertop

Leaving PowerTOP


라즈베리 파이 2B에서 하니 ACPI가 없어서 인지

BMS가 없어서 인지 모르겠지만 아래 링크에서 처럼 배터리 관련 W 정보가 나오지 않는다.

PowerTOP 2.6.1    Overview   Idle stats   Frequency stats   Device stats   Tunables


Summary: 0.0 wakeups/second,  0.0 GPU ops/seconds, 0.0 VFS ops/sec and 7.2% CPU use


                Usage       Events/s    Category       Description

             51.1 ms/s      0.00        Process        powertop

              3.3 ms/s      0.00        Interrupt      [62] dwc_otg_hcd:usb1

              2.0 ms/s      0.00        Process        /usr/bin/python /usr/bin/fail2ban-server -b -s /va

              1.6 ms/s      0.00        Interrupt      [62] dwc_otg

              1.6 ms/s      0.00        Process        /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib

              1.5 ms/s      0.00        Process        [kworker/3:2]

              1.1 ms/s      0.00        Interrupt      [17] arch_timer

              1.0 ms/s      0.00        Interrupt      [62] dwc_otg_pcd

              0.8 ms/s      0.00        Process        [migration/0]

              0.7 ms/s      0.00        Process        [migration/1]

              0.7 ms/s      0.00        Process        [migration/2]

            685.3 µs/s      0.00        Interrupt      [7] sched(softirq)

            628.8 µs/s      0.00        Timer          hrtimer_wakeup

            514.7 µs/s      0.00        Process        sshd: pi@pts/0

            509.5 µs/s      0.00        Timer          tick_sched_timer

            426.9 µs/s      0.00        Process        [migration/3]

            380.7 µs/s      0.00        Interrupt      [9] RCU(softirq) 


odroid U3 에는 그래도 PMIC가 있어서 기대를 했는데 똑같이 BMS가 없어서 그런지 안나오는건 여전하다.

PowerTOP 2.8      Overview   Idle stats   Frequency stats   Device stats   Tunables


Summary: nan wakeups/second,  nan GPU ops/seconds, nan VFS ops/sec and -0.0% CPU use


                Usage       Events/s    Category       Description

            100.0%                      Device         USB device: S5P EHCI Host Controller

            100.0%                      Device         USB device: usb-device-0424-9730

              7.6 pkts/s                Device         Network interface: eth0 (smsc95xx)

              0.0%                      Device         USB device: EXYNOS OHCI Host Controller

              0.0%                      Device         runtime-reg-fixed-voltage.0

             10.8%                      Device         USB device: usb-device-0424-3503

              0.0%                      Device         I2C Device (8-0038): s5p_hdmiphy

              0.0%                      Device         I2C Adapter (i2c-1): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-2): i2c-gpio2

              0.0%                      Device         I2C Adapter (i2c-3): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-0): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-7): s3c2410-i2c

              0.0%                      Device         I2C Adapter (i2c-8): s3c2410-i2c

              0.0%                      Device         I2C Device (0-0006): dummy

              0.0%                      Device         I2C Device (0-0008): usb3503

              0.0%                      Device         I2C Device (0-0009): max77686

              0.0%                      Device         I2C Device (1-0010): max98090

              0.0%                      Device         I2C Device (2-0050): s5p_ddc 


[링크 : https://askubuntu.com/questions/73904/how-do-i-monitor-power-consumption]

Posted by 구차니
Linux/Ubuntu2018. 4. 19. 10:10

일단은 켜고 나서 apt로 검색해봐도 뜨는게 없는것 봐서는 자동으로 패키지 목록 갱신 안하는 듯?

$ ps -ef |grep apt

odroid    3346  2860  0 11:33 pts/1    00:00:00 grep --color=auto apt


$ ps -ef |grep dpkg

odroid    3348  2860  0 11:33 pts/1    00:00:00 grep --color=auto dpkg 



$ cat /etc/apt/apt.conf.d/10periodic

APT::Periodic::Update-Package-Lists "0";

APT::Periodic::Download-Upgradeable-Packages "0";

APT::Periodic::AutocleanInterval "0"; 

[링크 : https://www.garron.me/en/linux/turn-off-stop-ubuntu-automatic-update.html]

'Linux > Ubuntu' 카테고리의 다른 글

apt-mark 사용자가 수동으로 설치한 패키지 목록  (0) 2018.05.08
powertop  (0) 2018.05.04
시스템 모니터링 툴(CUI)  (0) 2018.02.21
리눅스 팩스 서버 구축?  (0) 2018.02.09
cgroups  (0) 2017.08.24
Posted by 구차니
Linux/Ubuntu2018. 2. 21. 12:46

동영상 보다 보니 멋지게 나오는 녀석이 있어서 검색

[링크 : https://www.youtube.com/watch?v=3bnhpAp_vBQ]


내가 원한 녀석은 바로.. nmon!

[링크 : https://www.tecmint.com/nmon-analyze-and-monitor-linux-system-performance/]


 $ sudo apt-get install nmon

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following NEW packages will be installed:

  nmon

0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.

Need to get 66.7 kB of archives.

After this operation, 194 kB of additional disk space will be used.

Get:1 http://mirrordirector.raspbian.org/raspbian/ jessie/main nmon armhf 14g+debian-1 [66.7 kB]

Fetched 66.7 kB in 1s (50.7 kB/s)

Selecting previously unselected package nmon.

(Reading database ... 155208 files and directories currently installed.)

Preparing to unpack .../nmon_14g+debian-1_armhf.deb ...

Unpacking nmon (14g+debian-1) ...

Processing triggers for man-db (2.7.5-1~bpo8+1) ...

Setting up nmon (14g+debian-1) ... 


한글 표시 문제로 깨지는군..

그리고 아쉽게도(!) 온도 표시가 없다.



s-tui : The Stress Terminal UI

sudo apt-get install gcc python-dev python-pip

(sudo) pip install s-tui


A deprecated ppa is available (tested on Ubuntu 16.04)

sudo add-apt-repository ppa:amanusk/python-s-tui

sudo apt-get update

sudo apt-get install python-s-tui

[링크 : https://itsfoss.com/stress-terminal-ui/]

[링크 : https://amanusk.github.io/s-tui/]


설치하려고 해보니까 python2대 헤더가 필요해서 이것저것 삽질 -_-

$ sudo apt-get install python-dev

$ sudo pip install s-tui 

[링크 : https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory]


집에 있는 녀석으로 원격으로 괴롭혀야 하려나? ㅋㅋ


'Linux > Ubuntu' 카테고리의 다른 글

powertop  (0) 2018.05.04
ubuntu auto update 끄기  (0) 2018.04.19
리눅스 팩스 서버 구축?  (0) 2018.02.09
cgroups  (0) 2017.08.24
리눅스 하드 절전 설정  (0) 2017.05.23
Posted by 구차니
Linux/Ubuntu2018. 2. 9. 09:15

예전에 검색해본적은 있는데 요즘 PCI modem이 없어서

(집에 찾아 보면 있을지도.. 그리고 ISA정도는 찾기 쉽지만.. 끄응...)

고민하다 보니 어라.. USB Modem이 있네?

아무튼 한번 시도는 해볼까?

아니면 시놀로지에 있으려나?


[링크 : http://www.hylafax.org/content/Main_Page]

[링크 : http://www.avantfax.com/]


[링크 : http://akal.co.kr/?p=255]

[링크 : http://akal.co.kr/?p=256]

[링크 : http://akal.co.kr/?p=334]

2012/01/01 - [Linux/Ubuntu] - hylafax - 리눅스용 팩스 서버



+

tiff로 받아지는건 어쩔수 없고 그걸 ps -> pdf로 변환하도록 스크립트 이용하면 되는 듯?

/usr/bin/tiff2ps -a -O $SPOOL/$TRUNCFILE.ps $SPOOL/$FILE

/usr/bin/ps2pdf $SPOOL/$TRUNCFILE.ps $SPOOL/$TRUNCFILE.pdf

[링크 : http://www.hylafax.org/site2/howto/faxrcvd/faxrcvd-pdf]

   [링크 : http://files.yajhfc.de/doc/hylafax_setup_bc.pdf]

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu auto update 끄기  (0) 2018.04.19
시스템 모니터링 툴(CUI)  (0) 2018.02.21
cgroups  (0) 2017.08.24
리눅스 하드 절전 설정  (0) 2017.05.23
cpulimit / resource quota  (0) 2017.02.15
Posted by 구차니
Linux2018. 1. 4. 22:06

odroid 에서 fat32로 포맷되었을 녀석을 꽂았더니 한글이 죄다 깨져서

mount로 확인해보니 아래처럼 나온다.

/dev/mmcblk1p1 on /media/boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro) 


일단.. odroid 커널이 어떻게 되어있는지 모르겠지만

커널에서 vfat 관련해서 cp949를 지원하도록 빌드 되어야 하는 것으로 보이는데 안되서 그런듯?

문제는.. 이걸 proc filesystem 등에서 확인할 방법이 있는지 모르겠네..


[링크 : http://blog.syszone.co.kr/217]

[링크 : http://gentooboy.tistory.com/196]

[링크 : https://kldp.org/node/84341]

[링크 : http://www.aesop.or.kr/Board_Community_QandA/26128]

'Linux' 카테고리의 다른 글

네트워크 인터페이스 명칭이 이상하다? enp0s0? em0?  (0) 2019.01.23
getopt()  (0) 2018.11.12
taint kernel?  (0) 2017.12.03
limits.conf와 ulimit  (0) 2017.08.24
elf 파일에서 컴파일러 버전 알아내기  (0) 2017.06.07
Posted by 구차니
Linux2017. 12. 3. 11:55

결론은.. taint kernel 상태에 놓이는 건

오픈소스 커뮤니티에서 관리중이지 않다는 의미인데

일단 보증할 수 없는 상황이 하나라도 끼면 taint로 뜨게 되는 느낌...


When the kernel is tainted, it means that it is in a state that is not supported by the community. Most kernel developers will ignore bug reports involving tainted kernels, and community members may ask that you correct the tainting condition before they can proceed with diagnosing problems related to the kernel. In addition, some debugging functionality and API calls may be disabled when the kernel is tainted.

In most cases involving proprietary drivers, you can safely ignore the taint condition, but some scenarios which cause the kernel to become tainted may be indicative of serious system problems.

The feature is intended to identify conditions which may make it difficult to properly troubleshoot a kernel problem. For example, the loading of a proprietary module can make kernel debug output unreliable because kernel developers don't have access to the module's source code and therefore cannot determine what the module may have done to the kernel. Likewise, if the kernel had previously experienced an error condition or if a serious hardware error had occurred, the debug information generated by the kernel may not be reliable.

The kernel may become tainted for any of several reasons, including (but not limited to) the following:

  • The use of a proprietary (or non-GPL-compatible) kernel module—this is the most common cause of tainted kernels and usually results from loading proprietary NVIDIA or AMD video drivers
  • The use of staging drivers, which are part of the kernel source code but are not fully tested
  • The use of out-of-tree modules that are not included with the Linux kernel source code
  • Forcible loading or unloading of a kernel module (such as forcibly inserting a module not built for the current version of the kernel)
  • The use of an SMP (multiprocessor) kernel on certain unsupported uniprocessor CPUs, primarily older AMD Athlon processors
  • Overriding of the ACPI DSDT, sometimes needed to correct for power-management bugs (see here for details)
  • Certain critical error conditions, such as machine check exceptions and kernel oopses
  • Certain serious bugs in the system firmware (BIOS, UEFI) which the kernel must work around 

[링크 : https://unix.stackexchange.com/questions/118116/linux-what-is-a-tainted-kernel]

'Linux' 카테고리의 다른 글

getopt()  (0) 2018.11.12
mount -o codepage=cp949  (0) 2018.01.04
limits.conf와 ulimit  (0) 2017.08.24
elf 파일에서 컴파일러 버전 알아내기  (0) 2017.06.07
top VIRT?  (0) 2017.05.10
Posted by 구차니
Linux/Ubuntu2017. 8. 24. 11:50

cgroups는 그룹별로 cpu나 램 등의 리소스를 제한하는 툴인데

cgroup-tools 패키지로 설치하면 될 듯?

$ sudo apt-file search cgset

cgroup-tools: /usr/bin/cgset

cgroup-tools: /usr/share/man/man1/cgset.1.gz

fpc-source-2.6.4: /usr/share/fpcsrc/2.6.4/compiler/ncgset.pas 


$ apt-cache search cgroup-tools

cgroup-bin - control and monitor control groups (transitional package)

cgroup-tools - control and monitor control groups (tools) 


[링크 : https://help.ubuntu.com/lts/serverguide/cgroups.html]

[링크 : https://askubuntu.com/questions/836469/install-cgconfig-in-ubuntu-16-04]

'Linux > Ubuntu' 카테고리의 다른 글

시스템 모니터링 툴(CUI)  (0) 2018.02.21
리눅스 팩스 서버 구축?  (0) 2018.02.09
리눅스 하드 절전 설정  (0) 2017.05.23
cpulimit / resource quota  (0) 2017.02.15
우분투 루트 인증서 업데이트 내역  (0) 2017.01.18
Posted by 구차니
Linux2017. 8. 24. 11:30


자동으로 제한하는 스크립트/데몬 - cpulimit 이용

[링크 : http://www.myservlab.com/59]

[링크 : https://www.maketecheasier.com/limit-cpu-usage-of-any-process-in-linux/]


ulimit / limits.conf

[링크 : http://linux.systemv.pe.kr/리눅스-시스템-자원-제한/]


ulimit

[링크 : http://faq.hostway.co.kr/Linux_ETC/7179]

[링크 : https://stackoverflow.com/questions/978317/ulimit-t-under-ubuntu]


ulimit -Sa 소프트 제한 (-a 기본값)

ulimit -Ha 하드 제한

[링크 : http://blog.naver.com/dudwo567890/130156432746]

[링크 : http://coffeenix.net/board_print.php?bd_code=146]

-t : CPU의 초당 사용시간 제한

[링크 : http://blog.cafe24.com/1921]


-t는 그 시간만큼 돌아가면 프로세스를 죽여버리는 듯(무한 루프 방지 용도)

[링크 : https://unix.stackexchange.com/.../can-i-limit-a-process-to-a-certain-amount-of-time-cpu-cycles]

'Linux' 카테고리의 다른 글

mount -o codepage=cp949  (0) 2018.01.04
taint kernel?  (0) 2017.12.03
elf 파일에서 컴파일러 버전 알아내기  (0) 2017.06.07
top VIRT?  (0) 2017.05.10
cpulimit 백그라운드 실행 이유  (0) 2017.05.10
Posted by 구차니
Linux2017. 6. 7. 15:33



[링크 : https://stackoverflow.com/.../how-to-retrieve-the-gcc-version-used-to-compile-a-given-elf-executable]

'Linux' 카테고리의 다른 글

taint kernel?  (0) 2017.12.03
limits.conf와 ulimit  (0) 2017.08.24
top VIRT?  (0) 2017.05.10
cpulimit 백그라운드 실행 이유  (0) 2017.05.10
wget 로그인 정보 설정  (0) 2017.04.17
Posted by 구차니
Linux/Ubuntu2017. 5. 23. 15:32

$ sudo hdparm -S 값 장치명

1~240 / 5초 (5초 ~ 20분)

241~251 / 30분 (30분 ~ 5시간 30분)

252 / 21분?

253 / 업체별 상이 (8~ 12시간)

254 / reserved

255 / 21분 15초



 -S Put the drive into idle (low-power) mode, and also set the

              standby (spindown) timeout for the drive. This timeout value is

              used by the drive to determine how long to wait  (with  no  disk
              activity)  before  turning  off the spindle motor to save power.
              Under such circumstances, the drive  may  take  as  long  as  30
              seconds  to  respond  to  a  subsequent disk access, though most
              drives are much quicker.  The encoding of the timeout  value  is
              somewhat   peculiar.   A  value  of  zero  means  "timeouts  are
              disabled": the device will not automatically enter standby mode.
              Values  from  1  to 240 specify multiples of 5 seconds, yielding
              timeouts from 5 seconds to 20 minutes.  Values from 241  to  251
              specify from 1 to 11 units of 30 minutes, yielding timeouts from
              30 minutes to 5.5 hours.  A value of 252 signifies a timeout  of
              21  minutes. A value of 253 sets a vendor-defined timeout period
              between 8 and 12 hours, and the value 254 is reserved.   255  is
              interpreted as 21 minutes plus 15 seconds.  Note that some older
              drives may have very different interpretations of these values.

[링크 : http://manpages.ubuntu.com/manpages/zesty/en/man8/hdparm.8.html]


[링크 : https://askubuntu.com/questions/39760/how-can-i-control-hdd-spin-down-time]

[링크 : http://www.spencerstirling.com/computergeek/powersaving.html]

[링크 : https://wiki.archlinux.org/index.php/Power_management]

    [링크 : https://wiki.archlinux.org/index.php/Hdparm#Power_management_configuration]

'Linux > Ubuntu' 카테고리의 다른 글

리눅스 팩스 서버 구축?  (0) 2018.02.09
cgroups  (0) 2017.08.24
cpulimit / resource quota  (0) 2017.02.15
우분투 루트 인증서 업데이트 내역  (0) 2017.01.18
우분투 창 관리 - 윈7처럼 창분할 단축키  (0) 2017.01.09
Posted by 구차니