[root@localhost nfs]$ top -h
top: invalid option -- 'h'
BusyBox v1.24.1 (2022-12-08 15:49:07 KST) multi-call binary.

Usage: top [-b] [-nCOUNT] [-dSECONDS] [-m]

Provide a view of process activity in real time.
Read the status of all processes from /proc each SECONDS
and display a screenful of them.
Keys:
        N/M/P/T: show CPU usage, sort by pid/mem/cpu/time
        S: show memory
        R: reverse sort
        H: toggle threads, 1: toggle SMP
        Q,^C: exit

Options:
        -b      Batch mode
        -n N    Exit after N iterations
        -d N    Delay between updates
        -m      Same as 's' key


[root@localhost nfs]$ top --help
BusyBox v1.24.1 (2022-12-08 15:49:07 KST) multi-call binary.

Usage: top [-b] [-nCOUNT] [-dSECONDS] [-m]

Provide a view of process activity in real time.
Read the status of all processes from /proc each SECONDS
and display a screenful of them.
Keys:
        N/M/P/T: show CPU usage, sort by pid/mem/cpu/time
        S: show memory
        R: reverse sort
        H: toggle threads, 1: toggle SMP
        Q,^C: exit

Options:
        -b      Batch mode
        -n N    Exit after N iterations
        -d N    Delay between updates
        -m      Same as 's' key

Posted by 라퀴옹
,



 

 

 

 

 

1. tar xzvf openssl-1.1.1d.tar.gz; cd openssl-1.1.1d

2. vi mybuild.sh

#!/bin/sh
./Configure linux-generic32 shared -DL_ENDIAN --prefix=/tmp/openssl --openssldir=/tmp/openssl

TOOL_PREFIX=/home/user/bin/arm-arago-linux-gnueabi-
CROSS_COMPILE=${TOOL_PREFIX}

make install CC=${CROSS_COMPILE}gcc RANLIB=${CROSS_COMPILE}ranlib LD=${CROSS_COMPILE}ld MAKEDEPPROG=${CROSS_COMPILE}gcc PROCESSOR=ARM

3. mkdir /tmp/openssl

4. chmod +x mybuild.sh

5. ./mybuild.sh

 

 

 

 

 

 

Posted by 라퀴옹
,



 

 

 

 

1. sudo vi /etc/resolvconf/resolv.conf.d/base

# 알맞은 DNS 를 입력
nameserver xxx.xxx.xxx.xxx

2. sudo resolvconf -u

3. ping www.google.com  

 

 

 

 

Posted by 라퀴옹
,



우분트 콘솔만 있는 모드로 부팅하기!!
정식 명칭은 콘솔모드가 아닌가 봅니다. 아무리 수정해도 안되길래 검색해서 해결책을 찾았네요.
제가 필요한건 2번부터~ 2-1까지는 인터넷에 많이 있더라구요.
2-2 해주니까 잘동작합니다~ 감사합니다.  아...전 Mint 18.2 Sonya을 사용하고 있어요..

펌글입니다. 원본 http://ddart.net/xe/board/5094

1. 데스크탑 GUI 종료하는 법

ctrl + alt + f1 을 눌러 로그인 후

sudo service lightdm stop

 

2. GUI 모드대신 CLI모드로 부팅하는 법

 

2-1.  grub 수정

 

vi /etc/default/grub

 

1) GRUB_CMDLINE_LINUX_DEFAULT 라인 #붙여 주석처리

 

2) GRUB_CMDLINE_LINUX="" 라인을 GRUB_CMDLINE_LINUX="text" 로 수정

 

3) 몇줄 아래 '#GRUB_TERMINAL=console' 라인에서 주석처리된 부분을 #제거해서 'GRUB_TERMINAL=console' 로 수정

 

update-grub 명령으로 grub 업데이트

 

 

2-2 systemctl 변경

 

systemctl set-default multi-user.target

 

나중에 원래대로 돌리려면

systemctl set-default graphical.target

 

2 -3 reboot

 


Posted by 라퀴옹
,



# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         10.0.0.1        0.0.0.0         UG    100    0        0 eth0

10.0.0.0        *               255.255.255.0   U     100    0        0 eth0


#route add -net 192.168.0.0 netmask 255.255.255.0 dev eth0

# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         10.0.0.1        0.0.0.0         UG    100    0        0 eth0

10.0.0.0        *               255.255.255.0   U     100    0        0 eth0

192.168.0.0     *               255.255.255.0   U     0      0        0 eth0


#route del -net 192.168.0.0 netmask 255.255.255.0

# route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

default         10.0.0.1        0.0.0.0         UG    100    0        0 eth0

10.0.0.0        *               255.255.255.0   U     100    0        0 eth0



Posted by 라퀴옹
,




Got the error because there are space or tab  character at the end of line in Makefile.


#Makefile

...

32 LOCAL_SRCS    := $(LOCAL_PATH)/main.cpp \    

33                                $(LOCAL_PATH)/manager.cpp 


...

공백 있다고 컴파일 에러 뱉음...

그럼 맨뒤에 공백 대신 탭 쓰면 괜찮으려나..

~/work/app/Makefile.inc:32: *** missing separator (did you mean TAB instead of 8 spaces?).  Stop.



해보니 안됨..-_-;;;

환경 : Linux xxxx 3.19.0-32-generic #37~14.04.1-Ubuntu SMP Thu Oct 22 09:41:40 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

ARM CC : linaro-armv7ahf-2015.11-gcc5.2/arm-linux-gnueabihf


Posted by 라퀴옹
,



grep options

OS/LINUX 2016. 7. 25. 09:52


grep -rwn --exclude-dir=.svn --exclude-dir=.git --exclude=*.o -I PATTERN *


-I : ignore binary files

Posted by 라퀴옹
,



크롬은 리눅스용 32비트 지원 안하나보네요..언제부턴가 32비트를 찾아볼 수가 없네요...

겨우 찾아서 인스톨 하긴 했지만, 업데이트 안되니 알아서 하라네요..


흠..

OS를 바꿔야 할 시기가 오는가 보군요.

현재 민트리눅스민트17 32비트  사용 중인 상황입니다.ㅠㅠ

귀차니즘...에효..

혹시 32비트 데비안 버전 필요하신분은 아래 링크에서 받으셔요~

http://bbgentoo.ilb.ru/distfiles/google-chrome-stable_48.0.2564.116-1_i386.deb


아래 이미지는 설치요구사항입니다. 제게 해당되는건 리눅스용입니다.



Posted by 라퀴옹
,



man 2 clock_gettime

OS/LINUX 2016. 7. 8. 11:36

CLOCK_GETRES(2)                     Linux Programmer's Manual                     CLOCK_GETRES(2)



NAME
       clock_getres, clock_gettime, clock_settime - clock and time functions

SYNOPSIS
       #include <time.h>

       int clock_getres(clockid_t clk_id, struct timespec *res);

       int clock_gettime(clockid_t clk_id, struct timespec *tp);

       int clock_settime(clockid_t clk_id, const struct timespec *tp);

       Link with -lrt (only for glibc versions before 2.17).

   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):

       clock_getres(), clock_gettime(), clock_settime():
              _POSIX_C_SOURCE >= 199309L

DESCRIPTION
       The  function  clock_getres()  finds  the  resolution  (precision)  of the specified clock
       clk_id, and, if res is non-NULL, stores it in the struct timespec pointed to by res.   The
       resolution  of clocks depends on the implementation and cannot be configured by a particu‐
       lar process.  If the time value pointed to by the argument tp of clock_settime() is not  a
       multiple of res, then it is truncated to a multiple of res.

       The  functions clock_gettime() and clock_settime() retrieve and set the time of the speci‐
       fied clock clk_id.

       The res and tp arguments are timespec structures, as specified in <time.h>:

           struct timespec {
               time_t   tv_sec;        /* seconds */
               long     tv_nsec;       /* nanoseconds */
           };

       The clk_id argument is the identifier of the particular clock on which to  act.   A  clock
       may be system-wide and hence visible for all processes, or per-process if it measures time
       only within a single process.

       All implementations support the  system-wide  real-time  clock,  which  is  identified  by
       CLOCK_REALTIME.   Its  time  represents seconds and nanoseconds since the Epoch.  When its
       time is changed, timers for a relative interval are unaffected, but timers for an absolute
       point in time are affected.

       More  clocks  may be implemented.  The interpretation of the corresponding time values and
       the effect on timers is unspecified.

       Sufficiently recent versions of glibc and the Linux kernel support the following clocks:

       CLOCK_REALTIME
              System-wide clock that measures real (i.e., wall-clock) time.  Setting  this  clock
              requires  appropriate privileges.  This clock is affected by discontinuous jumps in
              the system time (e.g., if the system administrator manually changes the clock), and
              by the incremental adjustments performed by adjtime(3) and NTP.

       CLOCK_REALTIME_COARSE (since Linux 2.6.32; Linux-specific)
              A  faster but less precise version of CLOCK_REALTIME.  Use when you need very fast,
              but not fine-grained timestamps.


       CLOCK_MONOTONIC
              Clock that cannot be set and represents monotonic time since  some  unspeci‐
              fied  starting  point.  This clock is not affected by discontinuous jumps in
              the system time (e.g., if the  system  administrator  manually  changes  the
              clock),  but  is  affected  by the incremental adjustments performed by adj‐
              time(3) and NTP.

       CLOCK_MONOTONIC_COARSE (since Linux 2.6.32; Linux-specific)
              A faster but less precise version of CLOCK_MONOTONIC.   Use  when  you  need
              very fast, but not fine-grained timestamps.

       CLOCK_MONOTONIC_RAW (since Linux 2.6.28; Linux-specific)
              Similar to CLOCK_MONOTONIC, but provides access to a raw hardware-based time
              that is not subject to NTP adjustments or the incremental  adjustments  per‐
              formed by adjtime(3).

       CLOCK_BOOTTIME (since Linux 2.6.39; Linux-specific)
              Identical to CLOCK_MONOTONIC, except it also includes any time that the sys‐
              tem is suspended.  This allows applications to get a suspend-aware monotonic
              clock without having to deal with the complications of CLOCK_REALTIME, which
              may have discontinuities if the time is changed using settimeofday(2).

       CLOCK_PROCESS_CPUTIME_ID (since Linux 2.6.12)
              High-resolution per-process timer from the CPU.

       CLOCK_THREAD_CPUTIME_ID (since Linux 2.6.12)
              Thread-specific CPU-time clock.

RETURN VALUE
       clock_gettime(), clock_settime() and clock_getres() return 0 for success, or -1 for
       failure (in which case errno is set appropriately).

ERRORS
       EFAULT tp points outside the accessible address space.

       EINVAL The clk_id specified is not supported on this system.

       EPERM  clock_settime() does not have permission to set the clock indicated.

VERSIONS
       These system calls first appeared in Linux 2.6.

CONFORMING TO
       SUSv2, POSIX.1-2001.

AVAILABILITY
       On  POSIX  systems on which these functions are available, the symbol _POSIX_TIMERS
       is defined in <unistd.h> to a value  greater  than  0.   The  symbols  _POSIX_MONO‐
       TONIC_CLOCK,  _POSIX_CPUTIME,  _POSIX_THREAD_CPUTIME indicate that CLOCK_MONOTONIC,
       CLOCK_PROCESS_CPUTIME_ID,  CLOCK_THREAD_CPUTIME_ID  are   available.    (See   also
       sysconf(3).)

NOTES
   Historical note for SMP systems
       Before    Linux    added    kernel   support   for   CLOCK_PROCESS_CPUTIME_ID   and
       CLOCK_THREAD_CPUTIME_ID, glibc implemented these clocks  on  many  platforms  using
       timer  registers  from  the CPUs (TSC on i386, AR.ITC on Itanium).  These registers
       may differ between CPUs and as a consequence these clocks may return bogus  results
       if a process is migrated to another CPU.

       If  the  CPUs in an SMP system have different clock sources then there is no way to
       maintain a correlation between the timer registers since each CPU  will  run  at  a
       slightly different frequency.  If that is the case then clock_getcpuclockid(0) will
       return ENOENT to signify this condition.  The two clocks will then be  useful  only
       if it can be ensured that a process stays on a certain CPU.

       The  processors  in  an  SMP  system  do not start all at exactly the same time and
       therefore the timer registers are typically running at an offset.   Some  architec‐
       tures  include  code  that attempts to limit these offsets on bootup.  However, the
       code cannot guarantee to accurately tune the offsets.  Glibc contains no provisions
       to  deal with these offsets (unlike the Linux Kernel).  Typically these offsets are
       small and therefore the effects may be negligible in most cases.

       Since glibc 2.4, the wrapper functions for the system calls described in this  page
       avoid  the  abovementioned  problems  by  employing  the  kernel  implementation of
       CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID, on systems that provide  such
       an implementation (i.e., Linux 2.6.12 and later).

BUGS
       According  to  POSIX.1-2001,  a  process  with "appropriate privileges" may set the
       CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID clocks using  clock_settime().
       On  Linux,  these clocks are not settable (i.e., no process has "appropriate privi‐
       leges").

SEE ALSO
       date(1),  gettimeofday(2),  settimeofday(2),  time(2),  adjtime(3),   clock_getcpu‐
       clockid(3), ctime(3), ftime(3), pthread_getcpuclockid(3), sysconf(3), time(7)

COLOPHON
       This page is part of release 3.54 of the Linux man-pages project.  A description of
       the  project,  and  information   about   reporting   bugs,   can   be   found   at
       http://www.kernel.org/doc/man-pages/.



                                            2013-09-04                            CLOCK_GETRES(2)

Posted by 라퀴옹
,



tar exclude

OS/LINUX 2013. 9. 30. 16:17



자꾸만 잊어버리네...


tar 묶을때....특정 디렉토리 빼기..


나 같은 경우는 .svn 디렉토리....



tar czvf source_09.tgz source_09/ --exclude .svn


이상...



분할압축~

tar czvf - target(file or directory) | split -b 10m - 생성할파일.tar.gz

Posted by 라퀴옹
,