프로그램 사용/docker2019. 6. 11. 15:47

ubuntu 18.04에서 docker-ce로 깐건데.. 이상하네

$ sudo docker help ps 

Usage:  docker ps [OPTIONS] 

List containers 

Options: 
  -a, --all             Show all containers (default shows just running) 
  -f, --filter filter   Filter output based on conditions provided 
      --format string   Pretty-print containers using a Go template 
  -n, --last int        Show n last created containers (includes all states) (default -1) 
  -l, --latest          Show the latest created container (includes all states) 
      --no-trunc        Don't truncate output 
  -q, --quiet           Only display numeric IDs 
  -s, --size            Display total file sizes 


요거야 원래 옵션이고 도는 놈들만(run) 보여주는거니 문제 안되는데

$ sudo docker ps 
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES 

 

읭.. -a과 --all이 같은거였나. -all이 아니었냐.. 아무튼 얘는 죽은것도 보여줌

$ sudo docker ps -a 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES 
4fdb1194f2c6        httpd               "-d"                     6 minutes ago       Created                    80/tcp              blissful_sinoussi 
d913540567fc        httpd               "httpd-foreground"       6 minutes ago       Exited (0) 6 minutes ago                       admiring_colden 
8c8c15aee063        mysql               "docker-entrypoint.s…"   7 minutes ago       Exited (1) 7 minutes ago                       quirky_fermi 
54eb43ad0783        atmoz/sftp          "/entrypoint"            8 minutes ago       Exited (3) 7 minutes ago                       elegant_napier 
$ sudo docker ps --all 
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                     PORTS               NAMES 
4fdb1194f2c6        httpd               "-d"                     6 minutes ago       Created                    80/tcp              blissful_sinoussi 
d913540567fc        httpd               "httpd-foreground"       6 minutes ago       Exited (0) 6 minutes ago                       admiring_colden 
8c8c15aee063        mysql               "docker-entrypoint.s…"   7 minutes ago       Exited (1) 7 minutes ago                       quirky_fermi 
54eb43ad0783        atmoz/sftp          "/entrypoint"            8 minutes ago       Exited (3) 7 minutes ago                       elegant_napier 

 

얘는 일단 잘못된 옵션인데.. -a랑도 다르게 나오고 머지?

$ sudo docker ps -all 
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES 
4fdb1194f2c6        httpd               "-d"                6 minutes ago       Created             80/tcp              blissful_sinoussi 

 

'프로그램 사용 > docker' 카테고리의 다른 글

docker run -p hport:cport  (0) 2019.06.13
docker api  (0) 2019.06.12
docker 컨테이너 이미지 이름으로 검색하기  (0) 2019.06.10
docker create와 docker rm  (0) 2019.05.30
docker 자원 제한하기  (0) 2019.05.17
Posted by 구차니
프로그램 사용/docker2019. 6. 10. 14:50

여러개는 힘들거 같고, 하나의 컨테이너만 살린다면

그걸 상속받아 만든 녀석에 대해서는 검색이 가능할 듯

 

 

docker ps -a -q  --filter ancestor="image name"

[링크 : https://stackoverflow.com/questions/32073971/stopping-docker-containers-by-image-name-ubuntu]

'프로그램 사용 > docker' 카테고리의 다른 글

docker api  (0) 2019.06.12
docker ps 옵션 차이  (0) 2019.06.11
docker create와 docker rm  (0) 2019.05.30
docker 자원 제한하기  (0) 2019.05.17
docker exited  (0) 2019.05.17
Posted by 구차니

의외로 postgres 서버의 메모리 늘리는 것은 크게 영향이 없는 듯 하고

설정 파일에서 이것저것 고친거랑.. cpu 갯수 늘린게 영향을 주려나?

일단은 확실한 벤치를 한건 아니지만 ramdom_page_cost 늘린게 가장 큰 영향을 주는 듯

 

work_mem
As I mentioned earlier, memory allocation and management is a big part of performance-tuning PostgreSQL. If your system is doing a lot of complex sorts, increasing the sort memory can help the database optimize its configuration for your setup. This allows PostgreSQL to cache more data in memory while it performs its sorting, as opposed to making expensive calls to the disk.

random_page_cost
This setting essentially is the amount of time that your optimizer should spend reading memory before reaching out to your disk. You should alter this setting only when you’ve done other plan-based optimizations that we’ll cover soon, such as vacuuming, indexing, or altering your queries and schema.

These are just some of the optimizations you can make for database configurations, but there are plenty more. Now that you know how to tweak your database setup, let’s look at another area for investigation: vacuuming.

[링크 : https://stackify.com/postgresql-performance-tutorial/]

 

shared_buffers =  — Editing this option is the simplest way to improve the performance of your database server. The default is pretty low for most modern hardware. General wisdom says that this should be set to roughly 25% of available RAM on the system. Like most of the options I will outline here you will simply need to try them at different levels (both up and down ) and see how well it works on your particular system. Most people find that setting it larger than a third starts to degrade performance.


effective_cache_size =  — This value tells PostgreSQL's optimizer how much memory PostgreSQL has available for caching data and helps in determing whether or not it use an index or not. The larger the value increases the likely hood of using an index. This should be set to the amount of memory allocated to shared_buffers plus the amount of OS cache available. Often this is more than 50% of the total system memory.


work_mem =  — This option is used to control the amount of memory using in sort operations and hash tables. While you may need to increase the amount of memory if you do a ton of sorting in your application, care needs to be taken. This isn't a system wide parameter, but a per operation one. So if a complex query has several sort operations in it it will use multiple work_mem units of memory. Not to mention that multiple backends could be doing this at once. This query can often lead your database server to swap if the value is too large. This option was previously called sort_mem in older versions of PostgreSQL.

[링크 : https://www.revsys.com/writings/postgresql-performance.html]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postresql backup & recovery  (0) 2019.06.12
postgresql schema  (0) 2019.06.12
postgresql drop all tables  (0) 2019.06.05
postgresql import from csv  (0) 2019.06.04
postgresql password chg  (0) 2019.06.04
Posted by 구차니
프로그램 사용/nmap2019. 6. 5. 16:40

nmap 에서 자동으로 cve 취약점 번호를 뱉어내주네?

다만 git으로 설치시 경로를 잘 잡아 주어야 한다.

 

[링크 : https://null-byte.wonderhowto.com/how-to/easily-detect-cves-with-nmap-scripts-0181925/]

'프로그램 사용 > nmap' 카테고리의 다른 글

eth 1394에서의 nmap 실행 실패  (0) 2011.12.31
nmap 도움말  (2) 2010.10.11
nmap for windows(zenmap)  (0) 2010.10.01
Posted by 구차니

 

 

DROP SCHEMA public CASCADE;

CREATE SCHEMA public;

GRANT ALL ON SCHEMA public TO postgres;

GRANT ALL ON SCHEMA public TO public;

 

[링크 : https://stackoverflow.com/questions/3327312/how-can-i-drop-all-the-tables-in-a-postgresql-database]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql schema  (0) 2019.06.12
postgres db 속도 향상  (0) 2019.06.07
postgresql import from csv  (0) 2019.06.04
postgresql password chg  (0) 2019.06.04
postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
Posted by 구차니

아래는 DOS 스타일로 CSV 파일로 부터 원하는 테이블에 데이터를 넣는 예제

COPY persons(first_name,last_name,dob,email) 
FROM 'C:\tmp\persons.csv' DELIMITER ',' CSV HEADER;

[링크 : http://www.postgresqltutorial.com/import-csv-file-into-posgresql-table/]

 

 

pgadmin4에서 이런걸 발견 못했는데 도대체 어디서 찾아야 하나..

Use the Import/Export data dialog to copy data from a table to a file, or copy data from a file into a table.

The Import/Export data dialog organizes the import/export of data through the Options and Columns tabs.

[링크 : https://www.pgadmin.org/docs/pgadmin4/dev/import_export_data.html]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgres db 속도 향상  (0) 2019.06.07
postgresql drop all tables  (0) 2019.06.05
postgresql password chg  (0) 2019.06.04
postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
postgresql WAL?  (0) 2019.03.14
Posted by 구차니
프로그램 사용/vi2019. 6. 4. 19:08

라기 보다는 검색한 내용 하이라이트 안하기에 가까운 느낌인데

n 누르면 다시 아까 검색했던 키워드를 기준으로 하이라이트 한다.

 

:noh

[링크 : https://vi.stackexchange.com/questions/184/]

 

'프로그램 사용 > vi' 카테고리의 다른 글

vi 에서 매칭되는 갯수 확인하기  (0) 2019.12.18
vi gg=G와 set ts  (0) 2019.07.04
vi 여러개 파일 편집하기(동시 x)  (0) 2017.09.16
vi 반복 입력  (0) 2017.09.16
vi 버퍼 컨트롤  (0) 2017.02.13
Posted by 구차니

헐.. 이렇게 간단한 명려어가 존재한다니.. 

 

sudo -u postgres psql postgres

\password postgres

Enter new password: 

Enter it again:

# \q

[링크 : https://serverfault.com/questions/110154/]

'프로그램 사용 > postgreSQL' 카테고리의 다른 글

postgresql drop all tables  (0) 2019.06.05
postgresql import from csv  (0) 2019.06.04
postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
postgresql WAL?  (0) 2019.03.14
postgresql encoding / collate  (0) 2019.03.08
Posted by 구차니

로컬에서 소스 관리 하다가

서버의 특정 디렉토리에 이력을 같이 넣고 싶어서 방법을 찾는 중

 

[링크 : https://mansoo-sw.blogspot.com/2017/08/git-repository-merge.html]

[링크 : https://luckyyowu.tistory.com/352]

[링크 : https://backlog.com/git-tutorial/kr/stepup/stepup7_4.html] cherry-pcik

[링크 : https://stackoverflow.com/questions/1214906/how-do-i-merge-a-sub-directory-in-git]

Posted by 구차니

UI 상에서 기본값이 변경되지 않는 버그(?)가 있는지

수동으로 설정 파일을 바꾸어 주어야 한다.

기본값은 0 인데 2로 바꾸면 획 삭제로 설정된다.

$ vim ~/.xournal/config

120 # default eraser mode (standard = 0, whiteout = 1, strokes = 2)
121 eraser_mode=2

[링크 : http://xournal.sourceforge.net/manual.html]

 

 

+

2020.01.08

귀찮으니 전체 내용 백업

$ cat config 
# Xournal configuration file.
# This file is generated automatically upon saving preferences.
# Use caution when editing this file manually.
#

[general]
# the display resolution, in pixels per inch
display_dpi=96.00
# the initial zoom level, in percent
initial_zoom=100.00
# maximize the window at startup (true/false)
window_maximize=false
# start in full screen mode (true/false)
window_fullscreen=false
# the window width in pixels (when not maximized)
window_width=1000
# the window height in pixels
window_height=700
# scrollbar step increment (in pixels)
scrollbar_speed=30
# the step increment in the zoom dialog box
zoom_dialog_increment=1
# the multiplicative factor for zoom in/out
zoom_step_factor=1.500
# continuous view (false = one page, true = continuous, horiz = horizontal)
view_continuous=true
# use XInput extensions (true/false)
use_xinput=true
# discard Core Pointer events in XInput mode (true/false)
discard_corepointer=false
# ignore events from other devices while drawing (true/false)
ignore_other_devices=true
# do not worry if device reports button isn't pressed while drawing (true/false)
ignore_btn_reported_up=true
# always map eraser tip to eraser (true/false)
use_erasertip=true
# always map touchscreen device to hand tool (true/false) (requires separate pen and touch devices)
touchscreen_as_hand_tool=false
# disable touchscreen device when pen is in proximity (true/false) (requires separate pen and touch devices)
pen_disables_touch=false
# name of touchscreen device for touchscreen_as_hand_tool
touchscreen_device_name=Touchscr
# buttons 2 and 3 switch mappings instead of drawing (useful for some tablets) (true/false)
buttons_switch_mappings=false
# automatically load filename.pdf.xoj instead of filename.pdf (true/false)
autoload_pdf_xoj=false
# enable periodic autosaves (true/false)
autosave_enabled=false
# delay for periodic autosaves (in seconds)
autosave_delay=5
# default path for open/save (leave blank for current directory)
default_path=
# use pressure sensitivity to control pen stroke width (true/false)
pressure_sensitivity=true
# minimum width multiplier
width_minimum_multiplier=0.00
# maximum width multiplier
width_maximum_multiplier=1.25
# interface components from top to bottom
# valid values: drawarea menu main_toolbar pen_toolbar statusbar
interface_order=menu main_toolbar pen_toolbar drawarea statusbar
# interface components in fullscreen mode, from top to bottom
interface_fullscreen=main_toolbar pen_toolbar drawarea
# interface has left-handed scrollbar (true/false)
interface_lefthanded=false
# hide some unwanted menu or toolbar items (true/false)
shorten_menus=false
# interface items to hide (customize at your own risk!)
# see source file xo-interface.c for a list of item names
shorten_menu_items=optionsProgressiveBG optionsLeftHanded optionsButtonSwitchMapping
# highlighter opacity (0 to 1, default 0.5)
# warning: opacity level is not saved in xoj files!
highlighter_opacity=0.50
# auto-save preferences on exit (true/false)
autosave_prefs=true
# force PDF rendering through cairo (slower but nicer) (true/false)
poppler_force_cairo=false
# prefer xournal's own PDF code for exporting PDFs (true/false)
exportpdf_prefer_legacy=false

[paper]
# the default page width, in points (1/72 in)
width=612.00
# the default page height, in points (1/72 in)
height=792.00
# the default paper color
color=white
# the default paper style (plain, lined, ruled, or graph)
style=lined
# apply paper style changes to all pages (true/false)
apply_all=false
# preferred unit (cm, in, px, pt)
default_unit=cm
# include paper ruling when printing or exporting to PDF (true/false)
print_ruling=true
# when creating a new page, duplicate a PDF or image background instead of using default paper (true/false)
new_page_duplicates_bg=false
# just-in-time update of page backgrounds (true/false)
progressive_bg=false
# bitmap resolution of PS/PDF backgrounds rendered using ghostscript (dpi)
gs_bitmap_dpi=144
# bitmap resolution of PDF backgrounds when printing with libgnomeprint (dpi)
pdftoppm_printing_dpi=150

[tools]
# selected tool at startup (pen, eraser, highlighter, selectregion, selectrect, vertspace, hand, image)
startup_tool=pen
# Use the pencil from cursor theme instead of a color dot (true/false)
pen_cursor=false
# default pen color
pen_color=black
# default pen thickness (fine = 1, medium = 2, thick = 3)
pen_thickness=0
# default pen is in ruler mode (true/false)
pen_ruler=false
# default pen is in shape recognizer mode (true/false)
pen_recognizer=false
# default eraser thickness (fine = 1, medium = 2, thick = 3)
eraser_thickness=2
# default eraser mode (standard = 0, whiteout = 1, strokes = 2)
eraser_mode=2
# default highlighter color
highlighter_color=yellow
# default highlighter thickness (fine = 1, medium = 2, thick = 3)
highlighter_thickness=2
# default highlighter is in ruler mode (true/false)
highlighter_ruler=false
# default highlighter is in shape recognizer mode (true/false)
highlighter_recognizer=false
# button 2 tool (pen, eraser, highlighter, text, selectregion, selectrect, vertspace, hand, image)
btn2_tool=eraser
# button 2 brush linked to primary brush (true/false) (overrides all other settings)
btn2_linked=true
# button 2 brush color (for pen or highlighter only)
btn2_color=white
# button 2 brush thickness (pen, eraser, or highlighter only)
btn2_thickness=2
# button 2 ruler mode (true/false) (for pen or highlighter only)
btn2_ruler=false
# button 2 shape recognizer mode (true/false) (pen or highlighter only)
btn2_recognizer=false
# button 2 eraser mode (eraser only)
btn2_erasermode=2
# button 3 tool (pen, eraser, highlighter, text, selectregion, selectrect, vertspace, hand, image)
btn3_tool=selectregion
# button 3 brush linked to primary brush (true/false) (overrides all other settings)
btn3_linked=true
# button 3 brush color (for pen or highlighter only)
btn3_color=white
# button 3 brush thickness (pen, eraser, or highlighter only)
btn3_thickness=0
# button 3 ruler mode (true/false) (for pen or highlighter only)
btn3_ruler=false
# button 3 shape recognizer mode (true/false) (pen or highlighter only)
btn3_recognizer=false
# button 3 eraser mode (eraser only)
btn3_erasermode=2
# thickness of the various pens (in points, 1 pt = 1/72 in)
pen_thicknesses=0.42;0.85;1.41;2.26;5.67
# thickness of the various erasers (in points, 1 pt = 1/72 in)
eraser_thicknesses=2.83;8.50;19.84
# thickness of the various highlighters (in points, 1 pt = 1/72 in)
highlighter_thicknesses=2.83;8.50;19.84
# name of the default font
default_font=Sans
# default font size
default_font_size=12.0
minimonk@mini2760p:~/.xournal$ 









'프로그램 사용 > xournal' 카테고리의 다른 글

xournal++ 는 반드시 PPA로 설치하자?  (0) 2020.10.22
xournal++  (0) 2020.09.16
Posted by 구차니