'Linux'에 해당되는 글 764건

  1. 2020.12.04 pdsh
  2. 2020.12.04 bash $$ 변수, 배열, 반복
  3. 2020.12.04 bash 배열
  4. 2020.12.04 find -mmin
  5. 2020.12.02 centos 8.2 네트워크 설정
  6. 2020.11.07 /dev/ipmi를 보고 싶다!!!
  7. 2020.10.14 linux 스토리지 정보
  8. 2020.10.06 우분투에서 부팅 USB 만들기(iso)
  9. 2020.10.05 jaaa - JACK and ALSA Audio Analyser
  10. 2020.09.24 ipmitool
Linux2020. 12. 4. 16:12

복수개의 target에 ssh로 접속해서 동일한 명령어로 실행하는 유틸리티

 

Some examples of usage follow:

Run command on foo01,foo02,...,foo05
    pdsh -w foo[01-05] command

Run command on foo7,foo9,foo10
pdsh -w foo[7,9-10] command
Run command on foo0,foo4,foo5
pdsh -w foo[0-5] -x foo[1-3] command

A suffix on the hostname is also supported:
Run command on foo0-eth0,foo1-eth0,foo2-eth0,foo3-eth0
   pdsh -w foo[0-3]-eth0 command

 

[링크 : https://linux.die.net/man/1/pdsh]

[링크 : https://qastack.kr/server/2533/linux-running-the-same-command-on-many-machines-at-once]

'Linux' 카테고리의 다른 글

linux command line에서 mp3 재생하기  (0) 2020.12.08
shuf  (0) 2020.12.08
bash $$ 변수, 배열, 반복  (0) 2020.12.04
bash 배열  (0) 2020.12.04
find -mmin  (0) 2020.12.04
Posted by 구차니
Linux2020. 12. 4. 14:28

 

 

특수 매개 변수(Special Parameters)
문자 설명
$$ 현재 스크립트의 PID
$? 최근에 실행된 명령어, 함수, 스크립트 자식의 종료 상태
$! 최근에 실행한 백그라운드(비동기) 명령의 PID
$- 현재 옵션 플래그
$_ 지난 명령의 마지막 인자로 설정된 특수 변수

[링크 : https://blog.gaerae.com/2015/01/bash-hello-world.html]

 

배열

배열은 콤마가 아니라 공백으로 내용이 구분되어야 한다. 콤마를 넣으면 하나의 값이 들어있는 배열로 인식한다. 주의!!

배열명= ("내용1" "내용2")

[링크 : http://blog.redjini.com/282]

 

for 루프

변수의 제어문에서 존재하지 않는 변수를 사용할 경우 0으로 인식되는게 아니라 에러가 발생하니 주의!!

[링크 : https://skylit.tistory.com/321]

'Linux' 카테고리의 다른 글

shuf  (0) 2020.12.08
pdsh  (0) 2020.12.04
bash 배열  (0) 2020.12.04
find -mmin  (0) 2020.12.04
linux 스토리지 정보  (0) 2020.10.14
Posted by 구차니
Linux2020. 12. 4. 12:44

변수명=("내용", "내용", ...)

으로 선언하는데 접근은

${변수명[index]} 로 해야 한다.

 

 

# 빈 배열
EMPTY_LIST=()

PLANETS=( "EARTH" "MARS" "VINUS" )
# ${PLANETS[0]} == "EARTH"
# ${PLANETS[1]} == "MARS"
# ${PLANETS[2]} == "VINUS"

PLACES[0]="HERE"
PLACES[1]="THERE"
PLACES[2]="WHERE"

NAMES=()
NAMES+=("ME")    # ${NAMES[0]} == "ME"
NAMES+=("YOU")   # ${NAMES[1]} == "YOU"
NAMES+=("THEM")  # ${NAMES[2]} == "THEM"

[링크 : https://blog.leocat.kr/notes/2018/02/18/shell-declare-list]

'Linux' 카테고리의 다른 글

pdsh  (0) 2020.12.04
bash $$ 변수, 배열, 반복  (0) 2020.12.04
find -mmin  (0) 2020.12.04
linux 스토리지 정보  (0) 2020.10.14
linux page cache  (0) 2020.01.13
Posted by 구차니
Linux2020. 12. 4. 10:28

10분 이내로 수정된 파일 찾기

-mmin -10

 

[링크 : http://bahndal.egloos.com/565007]

'Linux' 카테고리의 다른 글

bash $$ 변수, 배열, 반복  (0) 2020.12.04
bash 배열  (0) 2020.12.04
linux 스토리지 정보  (0) 2020.10.14
linux page cache  (0) 2020.01.13
dmesg 시간 환산하기  (0) 2020.01.07
Posted by 구차니
Linux/centos2020. 12. 2. 10:29

minimal 버전으로 설치하긴 했는데 네트워크 넘겼는지 기억이 나지 않는다 -_ㅠ

virtual box에서 NAT로 설정하고 설치를 했는데 네트워크가 잡히지 않아서 확인해보니

nmcli유틸을 이용해서 네트워크를 올려주어야 한다.

$ sudo nmcli connection down enp1s0 && sudo nmcli connection up enp1s0

[링크 : https://linuxconfig.org/rhel-8-configure-static-ip-address]

 

위에대로 하면 1회성에 한해 네트워크 설정이 잡히는데

다시 설정 파일을 보니 ONBOOT=no로 되어있었다.

 

 

$ sudo vi /etc/sysconfig/network-script/ifcfg-enp0s3
ONBOOT=yes
#ONBOOT=no

[링크 : https://www.lesstif.com/system-admin/centos-network-centos-static-ip-13631535.html]

 

아니 이런건 기본값이 yes로 해달란 말이야.. ㅠㅠ

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

centos 8.3-2011 용량이 많이 늘었나?  (0) 2020.12.14
centos stream?  (0) 2020.12.10
ls 퍼미션에 .의 의미  (0) 2020.04.01
centos7 minimal / X11 사용하기  (0) 2020.02.04
리눅스 로그인 실패 로그  (2) 2019.07.07
Posted by 구차니
Linux/Ubuntu2020. 11. 7. 15:24

콴타 서버  파워가 이제 돌려받아져서 오랫만에 켜서 테스트 해보는데

영 안뜨네.. 얘도 ipmi 가 있는것 같긴한데 되는 장비를 못 보겠다 ㅠㅠ

$ sudo apt install ipmitool
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  freeipmi-common libfreeipmi17 libopenipmi0 libsensors-config libsensors5
  libsnmp-base libsnmp35 openipmi
Suggested packages:
  freeipmi-tools lm-sensors snmp-mibs-downloader
The following NEW packages will be installed:
  freeipmi-common ipmitool libfreeipmi17 libopenipmi0 libsensors-config
  libsensors5 libsnmp-base libsnmp35 openipmi
0 upgraded, 9 newly installed, 0 to remove and 6 not upgraded.
Need to get 3298 kB of archives.
After this operation, 14.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]

$ ipmitool
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

$ sudo dmidecode -t 1
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0001, DMI type 1, 27 bytes
System Information
        Manufacturer: Quanta
        Product Name: Freedom
        Version: C1
        Serial Number: To be filled by O.E.M.
        UUID: 26f47cac-5bb2-11d9-899f-9c4c68493100
        Wake-up Type: LAN Remote
        SKU Number: 16DIMM
        Family: Server

$ sudo dmidecode -t 2
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
        Manufacturer: Quanta
        Product Name: Winterfell
        Version: To be filled by O.E.M.
        Serial Number: To be filled by O.E.M.
        Asset Tag: To be filled by O.E.M.
        Features:
                Board is a hosting board
                Board is replaceable
        Location In Chassis: Left
        Chassis Handle: 0x0003
        Type: Motherboard
        Contained Object Handles: 0

$ sudo dmidecode -t 3
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
        Manufacturer: Quanta
        Type: Rack Mount Chassis
        Lock: Not Present
        Version: To Be Filled By O.E.M.
        Serial Number: To Be Filled By O.E.M.
        Asset Tag: To Be Filled By O.E.M.
        Boot-up State: Safe
        Power Supply State: Safe
        Thermal State: Safe
        Security Status: None
        OEM Information: 0x00000000
        Height: 2 U
        Number Of Power Cords: 1
        Contained Elements: 0
        SKU Number: To be filled by O.E.M.

$ sudo modprobe ipmi_devintf
$ ll /dev/i
i2c-0    initctl  input/
$ sudo modprobe ipmi_si
modprobe: ERROR: could not insert 'ipmi_si': No such device

$ dmesg | tail
[  197.942225] IPMI message handler: version 39.2
[  197.944408] ipmi device interface
[  210.061984] ipmi_si: IPMI System Interface driver
[  210.062167] ipmi_si: Unable to find any System Interface(s)

 

+

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

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

우분투 패키지 버전 확인하기  (0) 2020.12.16
ubuntu 20.04 한글입력기  (2) 2020.12.07
우분투에서 부팅 USB 만들기(iso)  (0) 2020.10.06
jaaa - JACK and ALSA Audio Analyser  (0) 2020.10.05
ipmitool  (0) 2020.09.24
Posted by 구차니
Linux2020. 10. 14. 12:47

lshw 를 통해서는 아래와 같이 제조사 정도의 정보 밖에 없고

모델명이나 시리얼은 나오지 않는다.

$ sudo lshw -class storage
  *-storage                 
       description: Non-Volatile memory controller
       product: NVMe SSD Controller SM981/PM981
       vendor: Samsung Electronics Co Ltd
       physical id: 0
       bus info: pci@0000:3a:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: storage pm msi pciexpress msix nvm_express bus_master cap_list
       configuration: driver=nvme latency=0
       resources: irq:16 memory:92300000-92303fff
  *-storage
       description: Non-Volatile memory controller
       product: SK hynix
       vendor: SK hynix
       physical id: 0
       bus info: pci@0000:3b:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: storage pm msi msix pciexpress nvm_express bus_master cap_list
       configuration: driver=nvme latency=0
       resources: irq:16 memory:92200000-92203fff memory:92205000-92205fff memory:92204000-92204fff

 

사용중인 노트북에는 nvme가 2개가 있는데

/dev/nvme0로 잡히고

/sys/block/nvme0n1/devices

/sys/block/nvme1n1/devices 하위에

model, serial 등이 내가 nvme 모델명, nvme 시리얼 값이다.

/sys/block/nvme0n1/device$ ll
합계 0
drwxr-xr-x  4 root root    0 10월 14 09:29 ./
drwxr-xr-x  3 root root    0 10월 14 09:29 ../
-r--r--r--  1 root root 4096 10월 14 12:45 address
-r--r--r--  1 root root 4096 10월 14 12:45 cntlid
-r--r--r--  1 root root 4096 10월 14 12:45 dev
lrwxrwxrwx  1 root root    0 10월 14 09:31 device -> ../../../0000:3a:00.0/
-r--r--r--  1 root root 4096 10월 14 12:45 firmware_rev
-r--r--r--  1 root root 4096 10월 14 09:29 model
-r--r--r--  1 root root 4096 10월 14 12:45 numa_node
drwxr-xr-x 13 root root    0 10월 14 09:29 nvme0n1/
drwxr-xr-x  2 root root    0 10월 14 12:45 power/
-r--r--r--  1 root root 4096 10월 14 12:45 queue_count
--w-------  1 root root 4096 10월 14 12:45 rescan_controller
--w-------  1 root root 4096 10월 14 12:45 reset_controller
-r--r--r--  1 root root 4096 10월 14 09:29 serial
-r--r--r--  1 root root 4096 10월 14 12:45 sqsize
-r--r--r--  1 root root 4096 10월 14 12:45 state
-r--r--r--  1 root root 4096 10월 14 12:45 subsysnqn
lrwxrwxrwx  1 root root    0 10월 14 09:29 subsystem -> ../../../../../../class/nvme/
-r--r--r--  1 root root 4096 10월 14 12:45 transport
-rw-r--r--  1 root root 4096 10월 14 09:29 uevent

 

[링크 : https://unix.stackexchange.com/questions/273971/how-to-get-hard-disk-information-on-linux-terminal]

'Linux' 카테고리의 다른 글

bash 배열  (0) 2020.12.04
find -mmin  (0) 2020.12.04
linux page cache  (0) 2020.01.13
dmesg 시간 환산하기  (0) 2020.01.07
screen 사용법  (0) 2019.12.18
Posted by 구차니
Linux/Ubuntu2020. 10. 6. 15:43

USB sd 리더에서 해보긴 했는데

fat32 였던지라 넣으면 바로 인식해서 마운트 되는 바람에

수동으로 umount를 해주어야 했지만 그래도 꽤 편하게 쓸 수 있는 툴

 

woeusbgui로 실행하면 된다.

 

[링크 : https://ncube.net/우분투에서-윈도우-10-설치-부팅-usb-만들기/]

[링크 : https://shiinachianti.tistory.com/32]

 

+

ntpasswd를 만들어봤는데 부팅이 안된다?

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

ubuntu 20.04 한글입력기  (2) 2020.12.07
/dev/ipmi를 보고 싶다!!!  (0) 2020.11.07
jaaa - JACK and ALSA Audio Analyser  (0) 2020.10.05
ipmitool  (0) 2020.09.24
rsync with ssh  (0) 2020.09.23
Posted by 구차니
Linux/Ubuntu2020. 10. 5. 17:14

흐으으으음... 

별 신기한 패키지가 다 있네?

$ jaaa

Jaaa-0.8.4

  (C) 2004-2010 Fons Adriaensen  <fons@kokkinizita.net>

Options:
  -h                 Display this text
  -name <name>       Jack and X11 name
  -J                 Use JACK, with options:
    -s <server>        Select Jack server
  -A                 Use ALSA, with options:
    -d <device>        Alsa device [hw:0]
    -C <device>        Capture device
    -P <device>        Playback device
    -r <rate>          Sample frequency [48000]
    -p <period>        Period size [1024]
    -n <nfrags>        Number of fragments [2]

  Either -J or -A is required.

 

실행은 아래 옵션으로 했음.

$ jaaa -A -d hw:0
playback :
  nchan  : 2
  fsamp  : 48000
  fsize  : 1024
  nfrag  : 2
  format : S32_LE
capture  :
  nchan  : 2
  fsamp  : 48000
  fsize  : 1024
  nfrag  : 2
  format : S32_LE
synced
Connected to ALSA with 2 inputs and 2 outputs
Can't create ALSA thread with RT priority
Warning: memory lock failed.

 

[링크 : http://manpages.ubuntu.com/manpages/xenial/man1/jaaa.1.html]

 

 

+

부랴부랴 audacity 설치하고 생성에서 1kHz 짜리 파형을 생성! 확대해서 보니 음.. 이쁜 정현파군?

 

노트북에 이어폰 꼽고, 마이크에 가져다 대고 jaaa를 실행하니

1k에 피크가 뜨긴 한데.. 이걸 어떻게 프로그램적으로 검사하지?

그리고 저 망할(?) 2k에는 왜 뜨는거야.. FFT 한계인가 문제인가? ㅠㅠ

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

/dev/ipmi를 보고 싶다!!!  (0) 2020.11.07
우분투에서 부팅 USB 만들기(iso)  (0) 2020.10.06
ipmitool  (0) 2020.09.24
rsync with ssh  (0) 2020.09.23
ubuntu 18.04 계산기 키가 작동하지 않을때  (0) 2020.09.22
Posted by 구차니
Linux/Ubuntu2020. 9. 24. 19:59

생각 난김에 설치해보는데 ipmi가 없는 일반 노트북에서는 에러가 나는건가..

 

$ sudo apt-get install ipmitool
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
다음의 추가 패키지가 설치될 것입니다 :
  freeipmi-common libfreeipmi16 libopenipmi0 openipmi
제안하는 패키지:
  freeipmi-tools
다음 새 패키지를 설치할 것입니다:
  freeipmi-common ipmitool libfreeipmi16 libopenipmi0 openipmi
0개 업그레이드, 5개 새로 설치, 0개 제거 및 4개 업그레이드 안 함.
1,985 k바이트 아카이브를 받아야 합니다.
이 작업 후 9,407 k바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] 
받기:1 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 freeipmi-common amd64 1.4.11-1.1ubuntu4.1 [174 kB]
받기:2 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libfreeipmi16 amd64 1.4.11-1.1ubuntu4.1 [826 kB]
받기:3 http://kr.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 ipmitool amd64 1.8.18-5ubuntu0.1 [403 kB]
받기:4 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libopenipmi0 amd64 2.0.22-1.1ubuntu2.1 [450 kB]
받기:5 http://kr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 openipmi amd64 2.0.22-1.1ubuntu2.1 [132 kB]
내려받기 1,985 k바이트, 소요시간 2초 (862 k바이트/초)
Selecting previously unselected package freeipmi-common.
(데이터베이스 읽는중 ...현재 242443개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../freeipmi-common_1.4.11-1.1ubuntu4.1_amd64.deb ...
Unpacking freeipmi-common (1.4.11-1.1ubuntu4.1) ...
Selecting previously unselected package libfreeipmi16.
Preparing to unpack .../libfreeipmi16_1.4.11-1.1ubuntu4.1_amd64.deb ...
Unpacking libfreeipmi16 (1.4.11-1.1ubuntu4.1) ...
Selecting previously unselected package ipmitool.
Preparing to unpack .../ipmitool_1.8.18-5ubuntu0.1_amd64.deb ...
Unpacking ipmitool (1.8.18-5ubuntu0.1) ...
Selecting previously unselected package libopenipmi0.
Preparing to unpack .../libopenipmi0_2.0.22-1.1ubuntu2.1_amd64.deb ...
Unpacking libopenipmi0 (2.0.22-1.1ubuntu2.1) ...
Selecting previously unselected package openipmi.
Preparing to unpack .../openipmi_2.0.22-1.1ubuntu2.1_amd64.deb ...
Unpacking openipmi (2.0.22-1.1ubuntu2.1) ...
freeipmi-common (1.4.11-1.1ubuntu4.1) 설정하는 중입니다 ...
libfreeipmi16 (1.4.11-1.1ubuntu4.1) 설정하는 중입니다 ...
libopenipmi0 (2.0.22-1.1ubuntu2.1) 설정하는 중입니다 ...
openipmi (2.0.22-1.1ubuntu2.1) 설정하는 중입니다 ...
ipmitool (1.8.18-5ubuntu0.1) 설정하는 중입니다 ...
Job for ipmievd.service failed because the control process exited with error code.
See "systemctl status ipmievd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript ipmievd, action "start" failed.
● ipmievd.service - IPMI event daemon
   Loaded: loaded (/lib/systemd/system/ipmievd.service; disabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2020-09-25 09:58:54 KST; 9ms ago
  Process: 6933 ExecStart=/usr/sbin/ipmievd $IPMIEVD_OPTIONS (code=exited, status=1/FAILURE)

 9월 25 09:58:54 minigram systemd[1]: Starting IPMI event daemon...
 9월 25 09:58:54 minigram ipmievd[6933]: Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory
 9월 25 09:58:54 minigram systemd[1]: ipmievd.service: Control process exited, code=exited status=1
 9월 25 09:58:54 minigram systemd[1]: ipmievd.service: Failed with result 'exit-code'.
 9월 25 09:58:54 minigram systemd[1]: Failed to start IPMI event daemon.
Unable to start ipmievd during installation.  Trying to disable.
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Processing triggers for systemd (237-3ubuntu10.42) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot
Processing triggers for install-info (6.5.0.dfsg.1-2) ...

[링크 : http://hpcadmin.tistory.com/61]

 

+

/dev/impi가 필요 하다고.

[링크 : https://lascrea.tistory.com/57]

 

해도 안올라오는데요 ㅠㅠ

[링크 : https://serverfault.com/questions/480371/ipmitool-cant-find-dev-ipmi0-or-dev-ipmidev-0]

 

Posted by 구차니