'프로그램 사용'에 해당되는 글 2263건

  1. 2019.03.17 nas samba warn
  2. 2019.03.15 url_rewriter squid
  3. 2019.03.14 postgresql WAL?
  4. 2019.03.14 youtube videoplayback 관련 URL
  5. 2019.03.14 squid hierarchy
  6. 2019.03.14 squid url_rewrite_program
  7. 2019.03.12 sqlite primary key
  8. 2019.03.08 postgresql encoding / collate
  9. 2019.03.08 postgresql 설치(centos)
  10. 2019.03.08 ckeditor 모드별 모양

윈10에서 NAS 삼바로 접속시에 자꾸 경고를 띄우는데

(우클릭만 해도 경고 -_-) 그거 끄는 법


[링크 : https://www.tekrevue.com/tip/these-files-might-be-harmful-to-your-computer-disable/]

Posted by 구차니
프로그램 사용/squid2019. 3. 15. 16:23

store url_rewrite_program within ssl bump


[링크 : https://github.com/rchunping/squid-urlrewrite]

[링크 : https://mindchasers.com/dev/app-squid-redirect]


[링크 : https://www.npmjs.com/package/nodecap2]

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

squid storeurl_rewrite  (0) 2019.04.02
lynx proxy  (0) 2019.03.27
squid hierarchy  (0) 2019.03.14
squid url_rewrite_program  (0) 2019.03.14
squid log code  (0) 2019.03.01
Posted by 구차니

서버를 보다보니 뭔가가 주기적으로 IO를 일으키는게 보여서

프로세스 확인해보니 특정 VM

특정 VM에다가 iotop 깔아서 보니 아래 녀석이 튀어나온다.

% postgres: wal writer process

% postgres: checkpointer process

% postgres: autovacuum worker process   dbname


그래서 WAL이 먼가 찾아보니 Write Ahead Logging의 약자라고..

WAL을 쓰면 하드에 쓰는 주기가 줄어든다고 하는데..

[링크 : http://postgresql.kr/docs/9.6/wal-intro.html]


[링크 : https://www.postgresql.org/docs/9.6/wal-intro.html]


체크포인트는 더티를 쓰는 거고(write back에 가깝나?)

 At checkpoint time, all dirty data pages are flushed to disk and a special checkpoint record is written to the log file.

[링크 : https://www.postgresql.org/docs/9.2/wal-configuration.html]

[링크 : https://www.postgresql.org/docs/8.2/wal-configuration.html]


얘는 garbage collector 인거 같네

 VACUUM -- garbage-collect and optionally analyze a database

[링크 : https://www.postgresql.org/docs/8.2/sql-vacuum.html]


[링크 : https://www.postgresql.org/docs/8.2/runtime-config-autovacuum.html]

[링크 : https://www.postgresql.org/docs/8.2/routine-vacuuming.html]



읽으려니 눈에 안들어 오네.. ㅠㅠ

[링크 : https://www.cybertec-postgresql.com/en/postgresql-writer-and-wal-writer-processes-explained/]

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

postgresql password chg  (0) 2019.06.04
postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
postgresql encoding / collate  (0) 2019.03.08
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
Posted by 구차니

흐음...

여러개 패킷을 까본건 아니지만 캐시에서 다른걸로 인식하는 이유가 저 망할 cpn 값 때문인 듯..

https://r2---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/videoplayback?source=youtube&ms=au%2Conr&mt=1552538122&

mv=m&id=o-ALgIWMfOrFHHMwZnmn-TneMiQB_DBuam4C3gy0uXrNt3&requiressl=yes&dur=478.244&mm=31%2C26&

mn=sn-ab02a0nfpgxapox-jwwe7%2Csn-oguelne7&pl=22&ip=211.237.16.76&

sparams=aitags%2Cclen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&signature

=E9FA7DEB837FF2931C1BBDF8A75CC08AA6381D.553ACDD01BBD44D14946BB8D37C5B285DD807580&gcr=kr

&ipbits=0&expire=1552559810&lmt=1548316020126515&initcwndbps=728750&

aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397&

mime=video%2Fmp4&itag=396&key=yt6&gir=yes&clen=16011686&keepalive=yes&txp=5532432&fvip=2&

ei=YtqJXMbHJKeGs8IPgp6B4AQ&

c=WEB&alr=yes&

cpn=zCV8-pls_I8uiHHw&

cver=2.20190313&

range=0-90603&

altitags=395%2C394&rn=1&rbuf=0

https://r2---sn-ab02a0nfpgxapox-jwwe7.googlevideo.com/videoplayback?source=youtube&ms=au%2Conr&mt=1552538122&

mv=m&id=o-ALgIWMfOrFHHMwZnmn-TneMiQB_DBuam4C3gy0uXrNt3&requiressl=yes&dur=478.244&mm=31%2C26&

mn=sn-ab02a0nfpgxapox-jwwe7%2Csn-oguelne7&pl=22&ip=211.237.16.76&

sparams=aitags%2Cclen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&signature

=E9FA7DEB837FF2931C1BBDF8A75CC08AA6381D.553ACDD01BBD44D14946BB8D37C5B285DD807580&gcr=kr

&ipbits=0&expire=1552559810&lmt=1548316020126515&initcwndbps=728750&

aitags=133%2C134%2C135%2C136%2C160%2C242%2C243%2C244%2C247%2C278%2C394%2C395%2C396%2C397&

mime=video%2Fmp4&itag=396&key=yt6&gir=yes&clen=16011686&keepalive=yes&txp=5532432&fvip=2&

ei=YtqJXMbHJKeGs8IPgp6B4AQ&

c=WEB&alr=yes&

cpn=naxiChjHuGyejORl&

cver=2.20190313&

range=0-90603&

altitags=395%2C394&rn=1&rbuf=0


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


+

크롬에서 개발자도구로 검색해보니 base.js 에서 cpn을 생성하는 부분을 발견..

Client Playback Nonce 줄여서 cpn

g.h.Wj = function(a) {

        lja(this, a);

        if ("html5.invalidstate" != a.errorCode && "fmt.unplayable" != a.errorCode && "fmt.unparseable" != a.errorCode || !WI(this, a.errorCode, a.details)) {

            var b = /^pp/.test(this.g.clientPlaybackNonce);

            if (kja(a)) {

                a.details.sts = "17968";

                if (YI(this)) {

                    g.U(this.l, 4) || !this.fa("html5_suspended_reload_killswitch") && g.U(this.l, 512) ? (this.Mc = !0, cI(this)) : (this.o && (a.g && (a.details.e = a.errorCode, a.errorCode = "qoe.restart", a.g = !1), this.o.onError(a.errorCode, Tw(a.details))), ZI(this));

                    return

                }

                a: if (!(6048E5 >

                        g.P() - this.A.vh)) {

                    try {

                        window.location.reload(!0);

                        break a

                    } catch (c) {}

                    this.fa("tvhtml5_retire_old_players") && g.Iy(this.A) && aJ(this)

                }

            }

            if ($I(a) && this.g.va && this.g.va.i) {

                if (this.o) this.o.onError(a.errorCode, Tw(a.details));

                this.Ya("highrepfallback", "1", !0);

                !this.fa("html5_hr_logging") && /^hr/.test(this.g.clientPlaybackNonce) && btoa && this.Ya("afmts", btoa(this.g.adaptiveFormats));

                zha(this.g);

                aI(this);

                cI(this);

                VI(this);

                this.playVideo()

            } else a.g ? (b = this.u ? this.u.B.o : null, b = $I(a) && b && b.isLocked() ? "FORMAT_UNAVALIABLE" :

                void 0, g.lI(this, a.errorCode, b, Tw(a.details))) : this.o && (this.o.onError(a.errorCode, Tw(a.details)), b && "manifest.net.connect" == a.errorCode && (a = "https://www.youtube.com/generate_204?cpn=" + this.g.clientPlaybackNonce + "&t=" + g.P(), (new IF(a, "manifest", (0, g.y)(function(c) {

                this.Ya("pathprobe", c)

            }, this), (0, g.y)(function(c) {

                this.onError(c.errorCode, Tw(c.details))

            }, this.o))).send()))

        }

    }; 


Posted by 구차니
프로그램 사용/squid2019. 3. 14. 13:01

두개가 연관이 있는 것 같으면서도 다른거 같은데


계층을 두어 관리하는 이유는 (캐시 계층)

squid 하나가 전체를 캐싱하는게 아니라 부모나 친척 노드에서 분산해서 캐시를 저장하기 위함으로 보인다.

[링크 : https://wiki.squid-cache.org/Features/CacheHierarchy]


그리고 그 계층과는 다르게 데이터를 분석함으로서

어떤 계층으로 나누어서 캐싱을 할지에 대한게 HTTP 프로토콜 레벨에서의 계층으로 나누고

그 계층에서 열외되는 애들은 캐싱을 하지 않도록 한다는 내용

What makes a request hierarchic

The purpose of cache hierarchy is to maximize the chance of finding objects in siblings, so a set of heuristics is applied to try and determine in advance whether an object is likely to be cacheable. A few objects are not cacheable, and are thus not hierarchic. Those are:

  • reload requests
  • cache validations with non-Squid ICP peers
  • requests for HTTP methods other than GETHEAD or TRACE

  • authenticated requests 


[링크 : https://wiki.squid-cache.org/KnowledgeBase/HierarchyControl]


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

lynx proxy  (0) 2019.03.27
url_rewriter squid  (0) 2019.03.15
squid url_rewrite_program  (0) 2019.03.14
squid log code  (0) 2019.03.01
squid hier/none direct 관련 설정  (0) 2019.02.27
Posted by 구차니
프로그램 사용/squid2019. 3. 14. 11:19

예전에 찾던 것 중에 php를 통해 무언가를 쓰는게 있었는데

얘 명칭이 helper multiplexer인 듯.

근데 어떤 포맷으로 데이터를 넘겨서 실행하게 하는지에 대해서는 안보이네?


2.4 Helper Multiplexer

The helper multiplexer's purpose is to relieve some of the burden Squid has when dealing with slow helpers. It does so by acting as a middleman between squid and the actual helpers, talking to Squid via the multiplexed concurrent variant of the helper protocol and to the helpers via the non-concurrent variant.

Helpers are started on demand, and in theory the muxer can handle up to 1k helpers per instance. It's up to squid to decide how many helpers to start.

The muxer knows nothing about the actual messages being passed around, and as such can't really (yet?) compensate for broken helpers. It is not yet able to manage dying helpers, but it will.

To configure the multiplexer add its binary name (usually /usr/share/libexec/helper-mux.pl) in front of the name of whichever helper is being multiplexed. It takes the helper binary path and parameters as its own command parameters. The concurrency setting already existing in Squid is used to configure how many child helpers it may run.

For example, a traditional configuration is

        url_rewrite_program /your/redirector.sh
        url_rewrite_children 5
   
the alternative multiplexer configuration is:
        url_rewrite_program /usr/share/libexec/helper-mux.pl /your/redirector.sh
        url_rewrite_children 1 concurrency=5
   

Helpers which are already concurrent protocol enabled gain little benefit from the multiplexer on most systems. However on some systems where Squid spawning helpers causes excess memory usage the reduction in direct helper spawned by Squid can result in a great reduction in resource use.

The helper can be controlled using various signals:

  • SIGHUP: dump the state of all helpers to STDERR

[링크 : ftp://ftp.arnes.si/packages/squid/squid-3.2.14-RELEASENOTES.html]


 # OPTIONS FOR URL REWRITING

# ----------------------------------------------------------------------------- # TAG: storeurl_rewrite_program # Specify the location of the executable for the Store URL rewriter. # The Store URL rewriter allows URLs to be "normalised" ; mapping # multiple URLs to a single URL representation for cache operations. # # For example, if you request an object at: # # http://srv1.example.com/image.gif # # and a subsequent request for: # # http://srv2.example.com/image.gif # # then Squid will treat these both as different URLs and cache them # seperately. # # This is almost the normal case, but an increasing number of sites # distribute the same content between multiple frontend hosts. # The Store URL rewriter allows you to rewrite these URLs to one URL # to use for cache operations, but not -fetches-. Fetches are still # made from the original site, but stored with the store URL rewritten # URL as the store key. # # For each requested URL rewriter will receive on line with the format # # URL <SP> client_ip "/" fqdn <SP> user <SP> method <SP> urlgroup # [<SP> kvpairs] <NL> # # In the future, the rewriter interface will be extended with # key=value pairs ("kvpairs" shown above). Rewriter programs # should be prepared to receive and possibly ignore additional # whitespace-separated tokens on each input line. # # And the rewriter may return a rewritten URL. The other components of # the request line does not need to be returned (ignored if they are). # # By default, a Store URL rewriter is not used. # # Please note - the normal URL rewriter rewrites Squid's _destination_ # URL - ie, what it fetches. The Store URL rewriter rewrites Squid's # _store_ URL - ie, what it uses to store and retrieve objects. # #Default: # none


#  TAG: url_rewrite_program
#	Specify the location of the executable for the URL rewriter.
#	Since they can perform almost any function there isn't one included.
#
#	For each requested URL rewriter will receive on line with the format
#
#	URL <SP> client_ip "/" fqdn <SP> user <SP> method <SP> urlgroup
#	 [<SP> kvpairs] <NL>
#
#	In the future, the rewriter interface will be extended with
#	key=value pairs ("kvpairs" shown above).  Rewriter programs
#	should be prepared to receive and possibly ignore additional
#	whitespace-separated tokens on each input line.
#
#	And the rewriter may return a rewritten URL. The other components of
#	the request line does not need to be returned (ignored if they are).
#
#	The rewriter can also indicate that a client-side redirect should
#	be performed to the new URL. This is done by prefixing the returned
#	URL with "301:" (moved permanently) or 302: (moved temporarily).
#
#	It can also return a "urlgroup" that can subsequently be matched
#	in cache_peer_access and similar ACL driven rules. An urlgroup is
#	returned by prefixing the returned URL with "!urlgroup!".
#
#	By default, a URL rewriter is not used.
#
#Default: 

# none 

[링크 : http://alter.org.ua/soft/win/squid_url_rewrite/squid.conf]


[링크 : https://wiki.squid-cache.org/Features/HelperMultiplexer]

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

url_rewriter squid  (0) 2019.03.15
squid hierarchy  (0) 2019.03.14
squid log code  (0) 2019.03.01
squid hier/none direct 관련 설정  (0) 2019.02.27
squid용 인증서 관련 (인증서 변환하기)  (0) 2019.02.25
Posted by 구차니
프로그램 사용/sqlite2019. 3. 12. 16:43

mysql을 이렇게 써본적이 없어서 모르겠는데..

pk를 자동증가로 설정하면 pk 라서 일단 중복을 체크하는 듯.

정상적이긴 한데.. 자동 증가면 그냥 값을 무시하는게 편리하지 않았을까..


[링크 : https://thinking-jmini.tistory.com/10]

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

연습용 Database (SQLite)  (2) 2019.12.18
sqlite memory cache  (0) 2019.05.21
sqlite dateime  (0) 2018.11.27
sqlite3 도움말  (0) 2017.04.02
라즈베리 sqlite 버전  (0) 2017.04.02
Posted by 구차니

당연하지만.. 얘도 db인지라 인코딩 언어를 설정해주어야 한다..

아무생각없이 그냥 initdb 하면 en_us로 설정되는 망할 centos ㅠㅠ


[링크 : http://linux.systemv.pe.kr/postgresql-과-문자셋/]

[링크 : https://www.postgresql.org/docs/9.5/app-initdb.html]

[링크 : https://www.postgresql.org/docs/9.3/multibyte.html]


+

이런 에러 발생 -_-

[링크 : https://stackoverflow.com/.../strange-postgresql-value-too-long-for-type-character-varying500]


+

윈도우용 postgresql에서 언어설정에 따라 collate가 정해지는데

ko_KR.UTF-8은 포기해도 UTF-8은 포기 못하니 영어(English_United State)로 하라고..

(auto로 하니 한글 윈10에서는 cp949로 되어버린다)

[링크 : https://stackoverflow.com/questions/40673339/creating-utf-8-database-in-postgresql-on-windows10]

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

postgresql 계정은 있는데 로그인 안될때  (0) 2019.03.20
postgresql WAL?  (0) 2019.03.14
postgresql 설치(centos)  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
Posted by 구차니

설치

postgresql 은 client

postgresql-server 는 server

# yum install postgresql  postgresql-server 


db 초기화

# service postgresql initdb

(그냥 centos7 에서 이렇게 하니 Encoding이 SQL_ASCII로 Collate가 C로 된다.. 아놔..)

+

$ su -l postgres -c "initdb -E UTF8 --locale=ko_KR.UTF-8 --locale=en_US.utf8"



설정 확인

# chkconfig postgresql on 


서비스 시작

# systemctl start postgresql 

[링크 : https://wiki.postgresql.org/wiki/YUM_Installation]

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=31850584]


사용자 생성 (암호 없이)

# sudo -i -u postgres

# psql

postgres=# create user [계정아이디] with password '';

postgres=# create database [데이터베이스 이름];

postgres=# \q

# exit

[링크 : https://www.lesstif.com/pages/viewpage.action?pageId=61899197]

[링크 : http://database.sarang.net/database/postgres/tutorial/lecture/x58.htm]


+

2019.06.18

sudo -u postgres psql postgres

# \password postgres

Enter new password:  

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


암호 바꾸기

postgres=# ALTER USER postgres WITH PASSWORD ''; 


[링크 : https://stackoverflow.com/questions/5421807/set-blank-password-for-postgresql-user]


접속되지 않을 경우

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

# vim /var/lib/pgsql/data/pg_hba.conf

host all all      ::1/128      trust

host all postgres 127.0.0.1/32 trust 


# vim /var/lib/pgsql/data/pg_hba.conf 

listen_addresses = '*'

[링크 : https://dba.stackexchange.com/.../connect-to-postgresql-server-fatal-no-pg-hba-conf-entry-for-host]

[링크 : https://sysops.tistory.com/8]


+

2019.06.18

서비스 재시작만으로는 포트가 안바뀌는 듯..(ubuntu 18.04) 그래서 완전히 재기동을 해야 하는 문제가 있었음


[링크 : https://blog.bigbinary.com/2016/01/23/configure-postgresql-to-allow-remote-connection.html]


+

2020.01.16

psql 상에서 현재 db의 locale을 확인할 수 있다.

# show LC_COLLATE;

[링크 : https://linux.systemv.pe.kr/postgresql-과-문자셋/]

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

postgresql WAL?  (0) 2019.03.14
postgresql encoding / collate  (0) 2019.03.08
postgreSQL centos 패키지  (0) 2019.02.01
postgreSQL 명령어 정리  (0) 2019.02.01
psql - postgreSQL CLI client  (0) 2019.02.01
Posted by 구차니

클래식

상단에 툴바 항상 나오고 그 바로 아래에 수정할 영역이 나옴


인라인

그냥 일반 문장 같은데


클릭하면 편집 가능하도록 변경됨


벌룬

인라인과 유사한데 드래그로 선택해야 툴바가 풍선으로 뜸


벌룬블록

선택영역에 따라 문단과 블록에 따라 서로 다른 툴바가 뜸


디커플러

툴바와 편집창을 분리해서 쓸 수 있다.

(문단별로 편집창을 띄우되 가장 위에 고정하는 식으로 운영 가능, 스크롤 할때 상단에 툴바 고정용으로 쓸 듯)


[링크 : https://ckeditor.com/docs/ckeditor5/latest/builds/guides/quick-start.html]

Posted by 구차니