'Linux'에 해당되는 글 763건

  1. 2024.03.08 lsusb -v 로 본 장치(HID MT, mouse)
  2. 2024.02.29 systemd 지연된 시작
  3. 2024.02.23 우분투로 공유기 만들기 2
  4. 2024.02.13 btrfs fsck
  5. 2024.01.31 ubuntu pro? 2
  6. 2024.01.09 리눅스 파일 시스템 캐싱
  7. 2023.10.24 minicom에서 stty로 터미널 폭 조절하기
  8. 2023.10.18 multitail / tail 2
  9. 2023.10.17 top 로그로 남기기
  10. 2023.09.04 tcpdump
Linux2024. 3. 8. 17:59

어떻게 MT(multi touch) 장치로 분류하나 궁금해서 보는데 영 모르겠다.

아마..도 멀티터치 장비? USB 유선 마우스(표준형)
Bus 001 Device 043: ID 0eef:c003 D-WAV Scientific Co., Ltd eGalaxTouch P80H84 0900 v12 k4.18.200
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0eef D-WAV Scientific Co., Ltd
  idProduct          0xc003 
  bcdDevice            0.12
  iManufacturer           1 eGalax Inc.
  iProduct                2 eGalaxTouch P80H84 0900 v12 k4.18.200
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0022
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          4 HID-Compliant-Device
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              350mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              5 HID-Interface
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     546
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
Bus 001 Device 048: ID 046d:c077 Logitech, Inc. M105 Optical Mouse
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x046d Logitech, Inc.
  idProduct          0xc077 M105 Optical Mouse
  bcdDevice           72.00
  iManufacturer           1 Logitech
  iProduct                2 USB Optical Mouse
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0022
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      1 Boot Interface Subclass
      bInterfaceProtocol      2 Mouse
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      46
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              10
can't get device qualifier: Resource temporarily unavailable
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)

'Linux' 카테고리의 다른 글

systemd 지연된 시작  (0) 2024.02.29
btrfs fsck  (0) 2024.02.13
리눅스 파일 시스템 캐싱  (0) 2024.01.09
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
multitail / tail  (2) 2023.10.18
Posted by 구차니
Linux2024. 2. 29. 11:54

 

[Service]
ExecStartPre=/bin/sleep 30

[링크 : https://stackoverflow.com/questions/43001223/]

'Linux' 카테고리의 다른 글

lsusb -v 로 본 장치(HID MT, mouse)  (0) 2024.03.08
btrfs fsck  (0) 2024.02.13
리눅스 파일 시스템 캐싱  (0) 2024.01.09
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
multitail / tail  (2) 2023.10.18
Posted by 구차니
Linux/Ubuntu2024. 2. 23. 19:16

해볼까?

pfsense도 귀찮고..

그냥 필요한건 간단하게 NAT와 포트포워딩, DHCP 정도인데..

 

NAT

iptable masqurade

[링크 : https://ko.linux-console.net/?p=15300]

 

iptable - port forward

[링크 : https://www.google.com/amp/s/tecadmin.net/setting-up-a-port-forwarding-using-iptables-in-linux/%3famp]

 

 

DHCP

dhcpd

[링크 : https://askubuntu.com/questions/913250/how-can-i-get-isc-dhcp-server-dhcpd-to-listen-on-one-interface-only]

 

방화벽

suricata

[링크 : https://www.hostinger.com/tutorials/how-to-install-suricata-on-ubuntu]

 

 

snort

[링크 : https://fni8383.tistory.com/m/35]

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

ubuntu pro?  (2) 2024.01.31
debian nvme tool  (0) 2023.08.28
edid-read  (0) 2023.08.17
ubutnu file(파일) 에서 삼바 목록 안나오고 부적절한 인수 에러  (0) 2023.07.24
htop graph style  (0) 2023.07.07
Posted by 구차니
Linux2024. 2. 13. 10:20

btrfs는 fsck로 체크 못하고, btrfs 유틸리티의 check 명령을 통해서 확인해야 한다.

# fsck /dev/mmcblk2p9
fsck from util-linux 2.37.4
If you wish to check the consistency of a BTRFS filesystem or
repair a damaged filesystem, see btrfs(8) subcommand 'check'.

# btrfs
btrfs               btrfs-convert       btrfs-find-root     btrfs-image         btrfs-map-logical   btrfs-select-super  btrfsck             btrfstune           

# btrfs check /dev/mmcblk2p9
Opening filesystem to check...
Checking filesystem on /dev/mmcblk2p9
UUID: a6226cd4-fc4e-4e20-8861-5870feefb3da
[1/7] checking root items
[2/7] checking extents
[3/7] checking free space tree
[4/7] checking fs roots
[5/7] checking only csums items (without verifying data)
[6/7] checking root refs
[7/7] checking quota groups skipped (not enabled on this FS)
found 12189671424 bytes used, no error found
total csum bytes: 11890008
total tree bytes: 14303232
total fs tree bytes: 180224
total extent tree bytes: 229376
btree space waste bytes: 1957387
file data blocks allocated: 12175368192
 referenced 12171370496

 

man은 안되서 --help를 보는데 내용이 부실하긴 하다. restore와 rescue는 어떨 때 쓸 수 있으려나?

# btrfs --help
usage: btrfs [--help] [--version] [--format <format>] [-v|--verbose] [-q|--quiet] <group> [<group>...] <command> [<args>]

    btrfs balance start [options] <path>
        Balance chunks across the devices
    btrfs balance pause <path>
        Pause running balance
    btrfs balance cancel <path>
        Cancel running or paused balance
    btrfs balance resume <path>
        Resume interrupted balance
    btrfs balance status [-v] <path>
        Show status of running or paused balance

    btrfs check [options] <device>
        Check structural integrity of a filesystem (unmounted).

    btrfs device add [options] <device> [<device>...] <path>
        Add one or more devices to a mounted filesystem.
    btrfs device delete <device>|<devid> [<device>|<devid>...] <path>
    btrfs device remove <device>|<devid> [<device>|<devid>...] <path>
        Remove a device from a filesystem
    btrfs device scan [-d|--all-devices] <device> [<device>...]
    btrfs device scan -u|--forget [<device>...]
        Scan or forget (unregister) devices of btrfs filesystems
    btrfs device ready <device>
        Check and wait until a group of devices of a filesystem is ready for mount
    btrfs device stats [options] <path>|<device>
        Show device IO error statistics
    btrfs device usage [options] <path> [<path>..]
        Show detailed information about internal allocations in devices.

    btrfs filesystem df [options] <path>
        Show space usage information for a mount point
    btrfs filesystem du [options] <path> [<path>..]
        Summarize disk usage of each file.
    btrfs filesystem show [options] [<path>|<uuid>|<device>|label]
        Show the structure of a filesystem
    btrfs filesystem sync <path>
        Force a sync on a filesystem
    btrfs filesystem defragment [options] <file>|<dir> [<file>|<dir>...]
        Defragment a file or a directory
    btrfs filesystem resize [options] [devid:][+/-]<newsize>[kKmMgGtTpPeE]|[devid:]max <path>
        Resize a filesystem
    btrfs filesystem label [<device>|<mount_point>] [<newlabel>]
        Get or change the label of a filesystem
    btrfs filesystem usage [options] <path> [<path>..]
        Show detailed information about internal filesystem usage .

    btrfs inspect-internal inode-resolve [-v] <inode> <path>
        Get file system paths for the given inode
    btrfs inspect-internal logical-resolve [-Pvo] [-s bufsize] <logical> <path>
        Get file system paths for the given logical address
    btrfs inspect-internal subvolid-resolve <subvolid> <path>
        Get file system paths for the given subvolume ID.
    btrfs inspect-internal rootid <path>
        Get tree ID of the containing subvolume of path.
    btrfs inspect-internal min-dev-size [options] <path>
        Get the minimum size the device can be shrunk to
    btrfs inspect-internal dump-tree [options] <device> [<device> ..]
        Dump tree structures from a given device
    btrfs inspect-internal dump-super [options] device [device...]
        Dump superblock from a device in a textual form
    btrfs inspect-internal tree-stats [options] <device>
        Print various stats for trees

    btrfs property get [-t <type>] <object> [<name>]
        Get a property value of a btrfs object
    btrfs property set [-f] [-t <type>] <object> <name> <value>
        Set a property on a btrfs object
    btrfs property list [-t <type>] <object>
        Lists available properties with their descriptions for the given object

    btrfs qgroup assign [options] <src> <dst> <path>
        Assign SRC as the child qgroup of DST
    btrfs qgroup remove [options] <src> <dst> <path>
        Remove a child qgroup SRC from DST.
    btrfs qgroup create <qgroupid> <path>
        Create a subvolume quota group.
    btrfs qgroup destroy <qgroupid> <path>
        Destroy a quota group.
    btrfs qgroup show [options] <path>
        Show subvolume quota groups.
    btrfs qgroup limit [options] <size>|none [<qgroupid>] <path>
        Set the limits a subvolume quota group.

    btrfs quota enable <path>
        Enable subvolume quota support for a filesystem.
    btrfs quota disable <path>
        Disable subvolume quota support for a filesystem.
    btrfs quota rescan [-sw] <path>
        Trash all qgroup numbers and scan the metadata again with the current config.

    btrfs receive [options] <mount>
    btrfs receive --dump [options]
        Receive subvolumes from a stream

    btrfs replace start [-Bfr] <srcdev>|<devid> <targetdev> <mount_point>
        Replace device of a btrfs filesystem.
    btrfs replace status [-1] <mount_point>
        Print status and progress information of a running device replace operation
    btrfs replace cancel <mount_point>
        Cancel a running device replace operation.

    btrfs rescue chunk-recover [options] <device>
        Recover the chunk tree by scanning the devices one by one.
    btrfs rescue super-recover [options] <device>
        Recover bad superblocks from good copies
    btrfs rescue zero-log <device>
        Clear the tree log. Usable if it's corrupted and prevents mount.
    btrfs rescue fix-device-size <device>
        Re-align device and super block sizes. Usable if newer kernel refuse to mount it due to mismatch super size
    btrfs rescue create-control-device
        Create /dev/btrfs-control (see 'CONTROL DEVICE' in btrfs(5))
    btrfs rescue clear-uuid-tree
        Delete uuid tree so that kernel can rebuild it at mount time

    btrfs restore [options] <device> <path>
    btrfs restore [options] -l <device>
        Try to restore files from a damaged filesystem (unmounted)

    btrfs scrub start [-BdqrRf] [-c ioprio_class -n ioprio_classdata] <path>|<device>
        Start a new scrub. If a scrub is already running, the new one fails.
    btrfs scrub cancel <path>|<device>
        Cancel a running scrub
    btrfs scrub resume [-BdqrR] [-c ioprio_class -n ioprio_classdata] <path>|<device>
        Resume previously canceled or interrupted scrub
    btrfs scrub status [-dR] <path>|<device>
        Show status of running or finished scrub

    btrfs send [-ve] [-p <parent>] [-c <clone-src>] [-f <outfile>] <subvol> [<subvol>...]
        Send the subvolume(s) to stdout.

    btrfs subvolume create [-i <qgroupid>] [<dest>/]<name>
        Create a subvolume
    btrfs subvolume delete [options] <subvolume> [<subvolume>...]
    btrfs subvolume delete [options] -i|--subvolid <subvolid> <path>
        Delete subvolume(s)
    btrfs subvolume list [options] <path>
        List subvolumes and snapshots in the filesystem.
    btrfs subvolume snapshot [-r] [-i <qgroupid>] <subvolume> { <subdir>/<name> | <subdir> }
        
    btrfs subvolume get-default <path>
        Get the default subvolume of a filesystem
    btrfs subvolume set-default <subvolume>
    btrfs subvolume set-default <subvolid> <path>
        Set the default subvolume of the filesystem mounted as default.
    btrfs subvolume find-new <path> <lastgen>
        List the recently modified files in a filesystem
    btrfs subvolume show [options] <path>
        Show more information about the subvolume (UUIDs, generations, times, snapshots)
    btrfs subvolume sync <path> [<subvol-id>...]
        Wait until given subvolume(s) are completely removed from the filesystem.

    btrfs help [--full] [--box]
        Display help information
    btrfs version
        Display btrfs-progs version

Use --help as an argument for information on a specific group or command.
Options for --format are: text, json

[링크 : https://www.nemonein.xyz/2019/12/2861/]

'Linux' 카테고리의 다른 글

lsusb -v 로 본 장치(HID MT, mouse)  (0) 2024.03.08
systemd 지연된 시작  (0) 2024.02.29
리눅스 파일 시스템 캐싱  (0) 2024.01.09
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
multitail / tail  (2) 2023.10.18
Posted by 구차니
Linux/Ubuntu2024. 1. 31. 10:13

오늘 출근했더니 갑자기 업그레이드 뜨면서 ubuntu pro를 활성화 하겠냐는데

라이센스도 모르고 하니 일단은 다음에 알림으로 설정!

 

+

설정 누르니 소프트웨어 & 업데이트에서 Ubuntu Pro가 추가되었는데..

 

Enable Ubuntu Pro 누르니 아래와 같이 먼가 나온다.  가입은 필수인 것 같은데..

 

 

 

홈페이지 뒤져보니 개인은 무료, 기업에서도 30일 무료 라는데

[링크 : https://ubuntu.com/pro]

 

데스크 탑이라도 해도 유료로는 년 금액인 것 같긴한데

머.. 보안업데이트랑 신경써서 해준다니 어떤 의미로는 나빠보이진 않는 듯.

근데 우분투도 장시간 서버로 써보면 업데이트 많아서 불편(?) 한데, 서버를 더 자주 리부팅 하게 되는건 아니겠지?

[링크 : https://ubuntu.com/pricing/pro]

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

우분투로 공유기 만들기  (2) 2024.02.23
debian nvme tool  (0) 2023.08.28
edid-read  (0) 2023.08.17
ubutnu file(파일) 에서 삼바 목록 안나오고 부적절한 인수 에러  (0) 2023.07.24
htop graph style  (0) 2023.07.07
Posted by 구차니
Linux2024. 1. 9. 16:18

요즘(?) 리눅스는 언젠가 부터 그냥 냅두면 메모리를 야곰야곰 먹으면서 file system을 캐싱하는데

page cache를 위해서 free 메모리를 자꾸 갉아먹는다.

[링크 : https://jujupapa.tistory.com/31]

 

slabtop이라는걸 통해서 캐싱되고 있는 페이지를 확인할 수 있다는데 봐도 무슨 소리이지 모르겠고..

slabtop
fopen /proc/slabinfo: 허가 거부

sudo cat /proc/slabinfo 
slabinfo - version: 2.1
# name            <active_objs> <num_objs> <objsize> <objperslab> <pagesperslab> : tunables <limit> <batchcount> <sharedfactor> : slabdata <active_slabs> <num_slabs> <sharedavail>
nf_conntrack         856   1248    256   32    2 : tunables    0    0    0 : slabdata     39     39      0
ovl_inode             44     44    728   22    4 : tunables    0    0    0 : slabdata      2      2      0
i915_dependency      256    256    128   32    1 : tunables    0    0    0 : slabdata      8      8      0

sudo slabtop -o
 활성 / 총 개체 수 (사용 %) : 3102305 / 3121463 (99.4%)
 활성 / 총 slab 수 (사용 %)   : 87745 / 87745 (100.0%)
 활성 / 총 캐시 수 (사용 %) : 130 / 178 (73.0%)
 활성 / 총 크기 (사용 %)     : 748809.62K / 753765.53K (99.3%)
 최소 / 평균 / 최대 개체 수: 0.01K / 0.24K / 9.00K

  활성 개체    사용개체크기  SLAB 개체/SLAB 캐시  크기 이름 
994617 994553  99%    0.10K  25503       39    102012K buffer_head            
463407 463082  99%    0.19K  22067       21     88268K dentry                 
342720 342595  99%    0.05K   4032       85     16128K shared_policy_node     
268299 268294  99%    1.16K   9937       27    317984K ext4_inode_cache       

sudo slabtop
 M-m~Y~\M-l~DM-1 / M-lM-4~] M-jM-0~\M-lM-2M-4 M-l~H~X (M-l~BM-,M-l~ZM-) %) : 3099702 / 3121184 (99.3%)
 M-m~Y~\M-l~DM-1 / M-lM-4~] slab M-l~H~X (M-l~BM-,M-l~ZM-) %)   : 87736 / 87736 (100.0%)
 M-m~Y~\M-l~DM-1 / M-lM-4~] M-lM-:~PM-l~K~\ M-l~H~X (M-l~BM-,M-l~ZM-) %) : 130 / 178 (73.0%)
 M-m~Y~\M-l~DM-1 / M-lM-4~] M-m~AM-,M-jM-8M-0 (M-l~BM-,M-l~ZM-) %)     : 748420.12K / 753805.55K (99.3%)
 M-lM-5~\M-l~F~L / M-m~O~IM-jM-7M-  / M-lM-5~\M-k~L~@ M-jM-0~\M-lM-2M-4 M-l~H~X: 0.01K / 0.24K / 9.00K

  M-m~Y~\M-l~DM-1 M-jM-0~\M-lM-2M-4    M-l~BM-,M-l~ZM-)M-jM-0~\M-lM-2M-4M-m~AM-,M-jM-8M-0  SLAB M-jM-0~\M-lM-2M-4/SLAB M-lM-:~PM-l~K~\  M-m~AM-,M-jM-8M-0 M-l~]M-4M-kM-&~D 
995397 995397  99%    0.10K  25523       39    102092K buffer_head
463407 462914  99%    0.19K  22067       21     88268K dentry
342720 342468  99%    0.05K   4032       85     16128K shared_policy_node

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

 

glusterFS 쪽에서 나오는 문서.

아무튼 커널에 의해서 캐싱된 내용을 어떻게 유지할 지 등에 대한 설정이 sysfs에 존재한다.

vm.vfs_cache_pressure
This option controls the tendency of the kernel to reclaim the memory which is used for caching of directory and inode objects.

At the default value of vfs_cache_pressure=100 the kernel will attempt to reclaim dentries and inodes at a "fair" rate with respect to pagecache and swapcache reclaim. Decreasing vfs_cache_pressure causes the kernel to prefer to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will never reclaim dentries and inodes due to memory pressure and this can easily lead to out-of-memory conditionsIncreasing vfs_cache_pressure beyond 100 causes the kernel to prefer to reclaim dentries and inodes.

With GlusterFS, many users with a lot of storage and many small files easily end up using a lot of RAM on the server side due to 'inode/dentry' caching, leading to decreased performance when the kernel keeps crawling through data-structures on a 40GB RAM system. Changing this value higher than 100 has helped many users to achieve fair caching and more responsiveness from the kernel.

[링크 : https://docs.gluster.org/en/main/Administrator-Guide/Linux-Kernel-Tuning/#linux-kernel-tuning-for-glusterfs]

 

 

To free pagecache: (페이지케쉬 클리어)
# echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes: (트리와 아이노드 클리어)
# echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes: (1번과 2번 모두 클리어)
# echo 3 > /proc/sys/vm/drop_caches

[링크 : https://help.iwinv.kr/manual/read.html?idx=464]

'Linux' 카테고리의 다른 글

systemd 지연된 시작  (0) 2024.02.29
btrfs fsck  (0) 2024.02.13
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
multitail / tail  (2) 2023.10.18
top 로그로 남기기  (0) 2023.10.17
Posted by 구차니
Linux2023. 10. 24. 14:58

minicom으로 통신을 하는데(시리얼)

창을 넓혀도 top 등을 실행할때 창의 폭이 넓어지지 않을때

아래의 명령을 넣어주면 폭이 조절된다.

$ stty columns 150

[링크 : https://acet.pe.kr/17]

 

posix 표준은 아니지만 columns N 하면 된다.

# stty --help
Usage: stty [-F DEVICE | --file=DEVICE] [SETTING]...
  or:  stty [-F DEVICE | --file=DEVICE] [-a|--all]
  or:  stty [-F DEVICE | --file=DEVICE] [-g|--save]
Print or change terminal characteristics.

Mandatory arguments to long options are mandatory for short options too.
  -a, --all          print all current settings in human-readable form
  -g, --save         print all current settings in a stty-readable form
  -F, --file=DEVICE  open and use the specified DEVICE instead of stdin
      --help     이 도움말을 표시하고 끝냅니다
      --version  버전 정보를 출력하고 끝냅니다

Optional - before SETTING indicates negation.  An * marks non-POSIX
settings.  The underlying system defines which settings are available.

Special characters:
 * discard CHAR  CHAR will toggle discarding of output
   eof CHAR      CHAR will send an end of file (terminate the input)
   eol CHAR      CHAR will end the line
 * eol2 CHAR     alternate CHAR for ending the line
   erase CHAR    CHAR will erase the last character typed
   intr CHAR     CHAR will send an interrupt signal
   kill CHAR     CHAR will erase the current line
 * lnext CHAR    CHAR will enter the next character quoted
   quit CHAR     CHAR will send a quit signal
 * rprnt CHAR    CHAR will redraw the current line
   start CHAR    CHAR will restart the output after stopping it
   stop CHAR     CHAR will stop the output
   susp CHAR     CHAR will send a terminal stop signal
 * swtch CHAR    CHAR will switch to a different shell layer
 * werase CHAR   CHAR will erase the last word typed

Special settings:
   N             set the input and output speeds to N bauds
 * cols N        tell the kernel that the terminal has N columns
 * columns N     same as cols N
 * [-]drain      wait for transmission before applying settings (on by default)
   ispeed N      set the input speed to N
 * line N        use line discipline N
   min N         with -icanon, set N characters minimum for a completed read
   ospeed N      set the output speed to N
 * rows N        tell the kernel that the terminal has N rows
 * size          print the number of rows and columns according to the kernel
   speed         print the terminal speed
   time N        with -icanon, set read timeout of N tenths of a second

'Linux' 카테고리의 다른 글

btrfs fsck  (0) 2024.02.13
리눅스 파일 시스템 캐싱  (0) 2024.01.09
multitail / tail  (2) 2023.10.18
top 로그로 남기기  (0) 2023.10.17
tcpdump  (0) 2023.09.04
Posted by 구차니
Linux2023. 10. 18. 10:33

여러개의 로그에 동시 다발적으로 추가되는 내용을

하나의 파일로 합쳐서 보고 싶어서 고민때리고 있었는데

 

어... 라? tail에 파일 인자가 한개가 아니....다?!

NAME
       tail - output the last part of files

SYNOPSIS
       tail [OPTION]... [FILE]...

 

tail -f <file1> <file2>

[링크 : https://unix.stackexchange.com/questions/149017/how-to-tail-multiple-files-using-tail-0f-in-linux-aix]

 

표준(?) tail에서는 지원안해서 multi tail 이라는 별도 유틸리티를 쓰면 된다는데 

gnu tail은 지원한다고 하니 그냥 기억만 해두면 될 듯.

$ multitail
명령어 'multitail' 을(를) 찾을 수 없습니다. 그러나 다음을 통해 설치할 수 있습니다:
sudo apt install multitail

'Linux' 카테고리의 다른 글

리눅스 파일 시스템 캐싱  (0) 2024.01.09
minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
top 로그로 남기기  (0) 2023.10.17
tcpdump  (0) 2023.09.04
dhcpd IP 할당 규칙  (0) 2023.09.01
Posted by 구차니
Linux2023. 10. 17. 19:44

top이 ncurse로 만들어져서

원하는 내용만 파일로 로그 남기기가 쉽지 않다

 

아래처럼 하면 1초에 1번 top을 실행해서 top.log에 쭈욱 쌓아둘수 있다.

$ top -b -d 1 > top.log

 

batch의 b

       -b  :Batch-mode operation
            Starts top in Batch mode, which could be useful for sending output
            from  top  to other programs or to a file.  In this mode, top will
            not accept input and runs until the iterations  limit  you've  set
            with the `-n' command-line option or until killed.

[링크 : https://qkr3232.tistory.com/136]

'Linux' 카테고리의 다른 글

minicom에서 stty로 터미널 폭 조절하기  (0) 2023.10.24
multitail / tail  (2) 2023.10.18
tcpdump  (0) 2023.09.04
dhcpd IP 할당 규칙  (0) 2023.09.01
시스템 audit 로그  (0) 2023.08.30
Posted by 구차니
Linux2023. 9. 4. 10:14

원인불명(?)으로 랜이 엄청나게 깜박여서 확인겸

어떤 소켓이나 어떤 포트로 요청이 들어오나 찾는법을 검색해보는데

tcpdump를 실행하면 된다고 해서 깔아봄

 

2995 packets captured
3250 packets received by filter
239 packets dropped by kernel

[링크 : https://stackoverflow.com/questions/21937162/how-to-find-out-the-number-of-transmitted-received-bytes-for-a-socket]

 

-n 줘서 resolve 안하면 drop이 줄어든다는데

도대체 머가 drop 되는진 어떻게 알 수 있을까?

[링크 : http://www.packetinside.com/2010/11/커널에서-drop-되는-패킷-수가-많다면.html]

'Linux' 카테고리의 다른 글

multitail / tail  (2) 2023.10.18
top 로그로 남기기  (0) 2023.10.17
dhcpd IP 할당 규칙  (0) 2023.09.01
시스템 audit 로그  (0) 2023.08.30
.bashrc 설정 history  (0) 2023.08.08
Posted by 구차니