锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲AV无码一区二区乱子伦,亚洲男人天堂2018av,亚洲综合激情九月婷婷http://www.tkk7.com/zhangwei217245/Always Beyond the Timezh-cnSat, 10 May 2025 18:53:47 GMTSat, 10 May 2025 18:53:47 GMT60銆怣ath's History銆戜粈涔堟槸緗楃礌鎮栬http://www.tkk7.com/zhangwei217245/archive/2014/09/25/418250.htmlX-SpiritX-SpiritWed, 24 Sep 2014 16:57:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2014/09/25/418250.htmlhttp://www.tkk7.com/zhangwei217245/comments/418250.htmlhttp://www.tkk7.com/zhangwei217245/archive/2014/09/25/418250.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/418250.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/418250.html闃呰鍏ㄦ枃

X-Spirit 2014-09-25 00:57 鍙戣〃璇勮
]]>
銆怑ffective銆慖ntelliJ IDEA MAC IDE config fileshttp://www.tkk7.com/zhangwei217245/archive/2014/03/16/411109.htmlX-SpiritX-SpiritSun, 16 Mar 2014 15:03:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2014/03/16/411109.htmlhttp://www.tkk7.com/zhangwei217245/comments/411109.htmlhttp://www.tkk7.com/zhangwei217245/archive/2014/03/16/411109.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/411109.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/411109.html

IDE Settings

IDE settings are stored in the dedicated directories under the product home directory, depending on the platform. The product home directory name is composed of the product name and version.

For IntelliJ IDEA Community edition the folder name is .IdeaICXX.

For example:

Windows
  • <User home>\.IntelliJIdeaXX\config that contains user-specific settings.
  • <User home>\.IntelliJIdeaXX\system that stores IntelliJ IDEA data caches.

<User home> in WindowsXP is C:\Documents and Settings\<User name>\; in Windows Vista it is C:\Users\<User name>\

Linux
  • ~/.IntelliJIdeaXX/config that contains user-specific settings.
  • ~/.IntelliJIdeaXX/system that stores IntelliJ IDEA data caches.

Mac OS
  • ~/Library/Application Support/IntelliJIdeaXX contains the catalog with plugins.
  • ~/Library/Preferences/IntelliJIdeaXX contains the rest of the configuration settings.
  • ~/Library/Caches/IntelliJIdeaXX contains data caches, logs, local history, etc. These files can be quite significant in size.
  • 9.0+~/Library/Logs/IntelliJIdeaXX contains logs

The config directory has several subfolders that contain xml files with your personal settings. You can easily share your preferred keymaps, color schemes, etc. by copying these files into the corresponding folders on another IntelliJ IDEA installation. Prior to copying, make sure that IntelliJ IDEA is not running, because it can erase the newly transferred files before shutting down.

The following is the list of some of the subfolders under the config folder, and the settings contained therein.

Folder nameUser Settings
codestyles Contains code style schemes.
colors Contains editor colors and fonts customization schemes.
filetypes Contains user-defined file types.
inspection Contains code inspection profiles.
keymaps Contains IntelliJ IDEA keyboard shortcuts customizations.
options Contains various options, for example, feature usage statistics and macros.
templates Contains user-defined live templates.
tools Contains configuration files for the user-defined external tools.
shelf Contains shelved changes.

Locations of the Config, System, and Plugins directories can be modified in IntelliJ IDEA_home\bin\idea.properties file.

You will need to adjust the following parameters:

  • idea.config.path
  • idea.system.path
  • idea.plugins.path


Increasing productivity

To increase productivity of IntelliJ IDEA, you can change settings that reside in the following locations (depending on your operating system):

  • On Windows systems:
    <IntelliJ IDEA installation folder>/bin/idea.exe.vmoptions
        
    or
    <IntelliJ IDEA installation folder>/bin/idea64.exe.vmoptions
        
  • On *NIX systems:
    <IntelliJ IDEA installation folder>/bin/idea.vmoptions
        
    or
    <IntelliJ IDEA installation folder>/bin/idea64.vmoptions
        
  • On Mac OS:

    Since version 12:
    The file /Applications/IntelliJ IDEA.app/bin/idea.vmoptions should be copied to

    ~/Library/Preferences/IntelliJIdeaXX/idea.vmoptions

Example. increasing heap size

For example, to increase IntelliJ IDEA heap size, you should copy the original .vmoptions file from /Applications/IntelliJ IDEA.app/bin/idea.vmoptions to~/Library/Preferences/IntelliJIdeaXX/idea.vmoptions, then modify the -Xmx setting.

For the older versions, the settings are stored in:

                    /Applications/IntelliJ IDEA.app/Contents/Info.plist

Managing case of unicode literals

11.1+

IntelliJ IDEA allows defining whether non-ascii characters should use literals like '\u00AB' or '\00ab'.

This behavior is controlled by the system property idea.native2ascii.lowercase. By default, upper case characters are used.

If it is desirable to use lower case characters, do the following (depending on your platform)

  • 12.0+On Windows and *NIX: add the line
        idea.native2ascii.lowercase=true
        

    to the bin/idea.properties file, located under the product installation.

  •  On Mac OS:

    Copy the file /Applications/IntelliJ IDEA.app/bin/idea.properties to ~/Library/Preferences/IntelliJIdeaXX/, open it for editing, and add the line

        idea.native2ascii.lowercase=true
        

    It is essential to create a copy, since the settings are replaced rather than added.

    For the older versions of IntelliJ IDEA, open for editing the file /Applications/IntelliJ IDEA.app/Contents/Info.plist, and add the following code:

        <key>idea.native2ascii.lowercase</key>
        <string>true</string>
        

    to the section <key>Properties</key> <dict> ... <dict>


To change IDEA running JDK, set <JVMVersion>  to 1.7* in /Applications/IntelliJ IDEA 13.app/Contents/Info.plist


VM arguments settings:


  • -Xms512m  
  • -Xmx512m  
  • -Xmn164m  
  • -XX:MaxPermSize=250m  
  • -XX:ReservedCodeCacheSize=64m  
  • -Xverify:none  
  • -Xnoclassgc  
  • -XX:+UseParNewGC  
  • -XX:+UseConcMarkSweepGC  
  • -XX:CMSInitiatingOccupancyFraction=85  
  • -ea 



  • X-Spirit 2014-03-16 23:03 鍙戣〃璇勮
    ]]>
    5 Ways To Burn Out Programminghttp://www.tkk7.com/zhangwei217245/archive/2014/02/12/409792.htmlX-SpiritX-SpiritWed, 12 Feb 2014 15:38:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2014/02/12/409792.htmlhttp://www.tkk7.com/zhangwei217245/comments/409792.htmlhttp://www.tkk7.com/zhangwei217245/archive/2014/02/12/409792.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/409792.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/409792.htmlfrom錛?http://blog.braegger.pw/5-ways-to-burn-out-programming/


    I've only recently come out of my burnout, despite it happening years ago. It sucks. It sucks bad. But looking back, I can see many of the causes crystal clearly, that weren't so apparent at the time. Here's a list:

    1. Think about your project and only the project

    Let's face it. Business wants you to make the best product you can "for our customers". You put off fun features for the sake of missing a deadline. You plan and analyze and break a project into sets of deliverables that then must be coded by a monkey (you). You demo it, gather feedback, iterate. All without thinking anything for yourself.

    But newsflash: you started programming because you thought it was fun, why not keep programming because it's fun? Take that little extra time to put in a feature you want. Challenge yourself a little bit in doing something you didn't think you could. Show it to everyone you know, and don't just ask for feedback, but brag about what you've done.

    2. Have a negative attitude toward everything.

    You know Docker? It sucks. Who would trust their production environment to a new, unstable, toy. Go? Do I look like I want to write every library myself? Everything I need is already in PyPI. This project I'm working on is so caught up in office politics, it's never going to work. Jenkins? 2008 wants their tech back.

    It's really easy to fall into the "being critical" trap. It's easy to tell other people what the "wrong" choice is. I imagine it's because as software engineers, our job is so find faults in our applications and fix them. And if we don't find them, someone else finds them for us.

    But I don't think we need to be negative about our job, decisions that are being made (even if it's not our decision) and what we're working on. Some of the best projects I've worked on worked out that way because we had a great, positive team. We enjoyed showing up every day to work, told each other when we did awesome things, held back heavy-handed criticism and phrased it in a productive manner.

    3. Use the tools you know, because you're faster that way

    So you're an uber expert in Java + Spring + Hibernate. Nobody can touch your python skillz. Every personal project you do should be in these, because all that matters is the business side of things, right?

    Wrong.

    While it definitely makes good business sense, you should prototype, play around, and become an expert in new tech, even if it's unvetted. While this might seem like obvious advice (it's repeated alllll the time), it becomes a lot harder to do as you grow more experienced.

    4. Switch jobs often

    Otherwise known as "chasing butterflies". Getting bored with what you're working on? Have an itch? Time to dust off that resume!

    This is bad, bad, bad.

    When you have several short employments, it can usually help boost your salary quite a bit, but you are robbing yourself of:

    1. Growing in the company (developer -> manager -> director)
    2. Gaining an expertise in a specific area. Considering it takes 4-6 years for a PhD student to get their PhD, that's a lot of time you need for learnin.
    3. You are having to start from scratch often.
    4. If you are a good developer, you have to "prove" yourself (people listen to you) all over again.

    So how do these contribute to burnout? Your career stagnates, you don't develop your skills as deeply (only breadth), people dont trust you'll stay employed for a while, and you're constantly having to prove yourself.

    5. Work long hours, ignore your life

    "You don't have to work a lot of hours, but some people choose to." You want to impress your boss. Hell, you want to impress yourself. So you go die-hard to meet an impossible deadline. You delivered the project on time, with all the extra features you wanted. You are the hero. High fives all around. And if you're lucky, you'll get that bonus.

    That's great the first time. But how about the second. And the third. It's a bomb, and you dont know how short the fuse is.

    Summary

    In short, it's easy to burnout. Do these 5 things, and you can burnout too.



    X-Spirit 2014-02-12 23:38 鍙戣〃璇勮
    ]]>
    銆怑fficiency銆戝揩閫熼厤緗畊buntu妗岄潰鐜涔婮ava鐜閰嶇疆[鍏ㄨ蔣浠舵簮瀹夎]http://www.tkk7.com/zhangwei217245/archive/2014/01/11/409716.htmlX-SpiritX-SpiritSat, 11 Jan 2014 03:42:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2014/01/11/409716.htmlhttp://www.tkk7.com/zhangwei217245/comments/409716.htmlhttp://www.tkk7.com/zhangwei217245/archive/2014/01/11/409716.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/409716.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/409716.html
    0. 瀹夎涓緋誨垪鏀寔宸ュ叿

    緗戠粶宸ュ叿wget銆乧url銆乤xel絳?br />
    浠g爜:
    sudo apt-get install wget curl axel

    鍏朵粬甯歌宸ュ叿
    浠g爜:
    sudo apt-get install subversion git sysstat linux-base linux-tools-generic build-essential vim emacs unrar p7zip synaptic

    瀹夎甯哥敤鏁版嵁搴撳拰NoSQL
    浠g爜:
    sudo apt-get install mysql-client mysql-server mysql-workbench memcached redis-server


    1. 棣栧厛娣誨姞webupd8鐨刯ava婧愶細

    浠g爜:
    sudo add-apt-repository ppa:webupd8team/java


    2. 鏇存柊婧愪腑鐨勮蔣浠舵暟鎹細

    浠g爜:
    sudo apt-get update


    3. 瀹夎java6鎴栬卝ava7, 褰撶劧涔熷彲浠ヤ袱鑰呴兘瑁?br />
    浠g爜:
    sudo apt-get install oracle-java8-installer
    sudo apt
    -get install oracle-java9-installer


    4. 瀹夎maven鍜宎nt

    浠g爜:
    sudo apt-get install maven ant

    鏈柟娉曞湪UBUNTU 13.04鐗堟湰涓粯璁ゅ畨瑁呯殑鏄痬aven 3.0.4鐗堟湰鍜宎nt 1.8鐗堟湰銆傚鏈夌壒孌婄増鏈棞濂斤紝璇瘋嚜琛屽埌apache.org涓嬭澆瀹夎銆?br />
    5. 閰嶇疆Maven

    鍔熷か緗戝唴鐢ㄦ埛鍙弬鐓т笅闈㈢殑閾炬帴榪涜閰嶇疆錛?br />
    http://maven.oschina.net/help.html

    鍏朵粬鍦板尯鐢ㄦ埛鍙嚜琛屽埌鑲℃矡涓婇棶鐧懼害銆?br />
    6. 涓嬭澆瀹夎涓縐嶄富嫻?JAVA IDE銆?nbsp;

    錛?錛?涓嬭澆瀹夎 IntelliJ IDEA

    璁塊棶錛?鏍規嵁闇瑕侀夋嫨鐗堟湰銆傛帹鑽愰夋嫨Free 30-day trial鐨刄ltimate鐗堟湰錛岃嚦浜庢縺媧葷爜鍢涳紝闂害濞橈紝浣犳噦鐨剘

    axel -n 10 "http://download.jetbrains.com/idea/ideaIU-14.1.3.tar.gz"

    tar xzvf ideaIU-14.1.3.tar.gz

    cd idea-IU-141.1010.3/bin

    sh idea.sh

    鏈鍚庤鎻愰啋涓鍙ャ傚浜庡湪鏍″鐢燂紝鎷ユ湁.edu閭鐨勬湅鍙嬶紝鍙互鐢ㄤ綘浠殑.edu閭鑾峰彇涓騫寸殑jetbrains鏃椾笅鎵鏈塈DE浜у搧鐨勪竴騫村厤璐逛嬌鐢ㄦ潈銆傝瑙?/div>
    https://www.jetbrains.com/student/
    涓騫磋繃鍚庯紝鍙浣犵殑閭榪樿兘鐢紝鍙互鍐嶆鐢寵銆?/div>


    錛?錛?涓嬭澆瀹夎eclipse IDE銆傦紙alternative step錛?br />
    璁塊棶http://www.eclipse.org/downloads/錛屾牴鎹渶瑕侀夋嫨IDE鐗堟湰銆傛帹鑽愰夋嫨Eclipse IDE for Java EE Developers鐗堟湰銆傚彲浠ユ牴鎹郴緇熸儏鍐甸夋嫨瀹夎32浣嶆垨鑰?4浣?br /> 榪欓噷浠ヤ笅杞?4浣嶄負渚?br />
    浠g爜:

    axel -10 "http://ftp.daum.net/eclipse//technology/epp/downloads/release/mars/R/eclipse-jee-mars-R-linux-gtk-x86_64.tar.gz"
    tar -zxvf 
     eclipse-jee-luna-SR2-linux-gtk-x86_64.tar.gz


    鐒跺悗灝辨槸鑷繁鍒涘緩蹇嵎鏂瑰紡鍒版闈箣綾葷殑銆?br />
    錛?錛?涓嬭澆netbeans IDE. 錛坅lternative step錛?br />
    璁塊棶www.netbeans.org錛岀劧鍚庢壘鍒頒笅杞藉湴鍧銆?br /> 榪欓噷浠ヤ笅杞?.0.2鐗堟湰涓轟緥錛?br />
    浠g爜:
    axel -10 "http://dlc-cdn.sun.com/netbeans/8.0.2/final/bundles/netbeans-8.0.2-linux.sh"
    sh 
    netbeans-8.0.2-linux.sh


    鎶妌etbeans閰嶇疆涓哄叏灞忓弽閿嬌妯″紡錛?br />
    浠g爜:
    cp netbeans.conf netbeans.conf.bak; awk -F'=' '{if($1=="netbeans_default_options"){print index($0,"useSystemAAFontSettings")?$0:substr($0,0,length($0))" -J-Dawt.useSystemAAFontSettings=on\""}else{print $0}}' netbeans.conf.bak > netbeans.conf




    7. 濡傛灉鎯沖仛蹇熷師鍨嬫垨鑰呯帺涓鐜╃殑璇濓紝涔熷彲浠ュ畨瑁呬竴涓媙odejs銆傚緢鏈夋剰鎬濄?br />
    浠g爜:
    sudo curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -

    sudo apt
    -get install nodejs


    8. GraphDB 鏈榪戝緢鐏傝涓猲eo4j璇曡瘯鐪嬨?br />
    浠g爜:
    wget -- http://debian.neo4j.org/neotechnology.gpg.key | apt-key add -
    sudo echo 
    'deb http://debian.neo4j.org/repo stable/' > /etc/apt/sources.list.d/neo4j.list
    sudo apt-get update
    sudo apt
    -get install neo4j


    X-Spirit 2014-01-11 11:42 鍙戣〃璇勮
    ]]>銆怑fficiency銆慚AC涓嬩嬌鐢ㄨ瀹氬彲浠ヤ粠mission control涓惎鍔ㄧ殑eclipse.app銆?/title><link>http://www.tkk7.com/zhangwei217245/archive/2013/02/25/410286.html</link><dc:creator>X-Spirit</dc:creator><author>X-Spirit</author><pubDate>Mon, 25 Feb 2013 06:53:00 GMT</pubDate><guid>http://www.tkk7.com/zhangwei217245/archive/2013/02/25/410286.html</guid><wfw:comment>http://www.tkk7.com/zhangwei217245/comments/410286.html</wfw:comment><comments>http://www.tkk7.com/zhangwei217245/archive/2013/02/25/410286.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/zhangwei217245/comments/commentRss/410286.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/zhangwei217245/services/trackbacks/410286.html</trackback:ping><description><![CDATA[@import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); @import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css); <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">eclipse瀹樻柟鏄湁鏍囧噯鐨刴ac鐗堜笅杞界殑錛岄殢渚縞opy鍒頒竴涓洰褰曞氨鍙互鐩存帴鍚姩浜?褰撶劧蹇呴』瀹夎java榪愯鐜)銆備絾鏄紝鍋囧鎴戜滑鎯蟲妸搴旂敤鏀懼埌mac鐨勬爣鍑嗙洰褰曚笅(涔熷氨鏄痜inder閲岀殑搴旂敤紼嬪簭鐩綍涓?錛屽氨蹇呴』鑷繁鎵嬪姩鏉ュ仛浜嗭紝鏂規硶濡備笅錛?/p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">1.鍦╢inder涓嬶紝copy eclipse鐩綍涓嬬殑Eclipse.app(鍦╢inder閲屾槸鐪嬩笉鍒癮pp榪欎釜鍚庣紑鍚嶇殑錛屽繀欏葷敤Command+i錛屾墠鑳界湅鍒拌繖涓悗緙鍚?鏂囦歡鍒?#8220;搴旂敤紼嬪簭”</p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">2.鐒跺悗錛岀偣鍑誨彸閿紝閫夋嫨“鏄劇ず鍖呭唴瀹?#8221;</p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;"><img src="" alt="" style="border: none; max-width: 100%;" /><img src="http://img.blog.csdn.net/20130914220143781?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2FuZ2ppYW41NzQ4/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" style="border: none; max-width: 100%;" /><br /> </p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;"></p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">3.淇敼eclipse.ini鏂囦歡</p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;"><img src="http://img.blog.csdn.net/20130914220153250?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvd2FuZ2ppYW41NzQ4/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" style="border: none; max-width: 100%;" /><br /> </p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;"><img src="" alt="" style="border: none; max-width: 100%;" /><br /> </p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">淇敼鏂囦歡鐨勫紑澶撮儴鍒?/p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">鍘熷鍐呭涓猴細</p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">-startup ../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar<br /> --launcher.library ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130521-0416<br /> </p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;"></p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">淇敼鍚庣殑鍐呭涓猴細</p> <span style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">-startup /Users/johnny/work/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar</span> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">--launcher.library /Users/johnny/work/eclipse/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130521-0416<br /> </p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">鎴憁ac鐨勭敤鎴峰悕johnny錛屽湪鎴戠殑鐢ㄦ埛鍚嶄笅鏈変釜work鐩綍錛屾垜鎶奺clipse鐨勫師濮嬬洰褰曟斁鍦╳ork涓嬮潰銆?/p> <p style="color: #362e2b; font-family: Arial; line-height: 26px; background-color: #ffffff;">榪欐牱灝卞彲浠ュ湪“搴旂敤紼嬪簭”涓嬶紝鍚姩eclipse浜?/p> @import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);<img src ="http://www.tkk7.com/zhangwei217245/aggbug/410286.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/zhangwei217245/" target="_blank">X-Spirit</a> 2013-02-25 14:53 <a href="http://www.tkk7.com/zhangwei217245/archive/2013/02/25/410286.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>銆怑ffective銆戝浣曡縼縐籫it浠撳簱http://www.tkk7.com/zhangwei217245/archive/2012/11/12/409785.htmlX-SpiritX-SpiritMon, 12 Nov 2012 10:58:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2012/11/12/409785.htmlhttp://www.tkk7.com/zhangwei217245/comments/409785.htmlhttp://www.tkk7.com/zhangwei217245/archive/2012/11/12/409785.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/409785.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/409785.html

    from: 

           http://segmentfault.com/q/1010000000124379

     


    濡傛灉浣犳兂浠庡埆鐨?Git 鎵樼鏈嶅姟閭i噷澶嶅埗涓浠芥簮浠g爜鍒版柊鐨?Git 鎵樼鏈嶅姟鍣ㄤ笂鐨勮瘽錛屽彲浠ラ氳繃浠ヤ笅姝ラ鏉ユ搷浣溿?/p>

    1). 浠庡師鍦板潃鍏嬮殕涓浠借8鐗堟湰搴擄紝姣斿鍘熸湰鎵樼浜?GitHub銆?/p>

    git clone --bare git://github.com/username/project.git

    2). 鐒跺悗鍒版柊鐨?Git 鏈嶅姟鍣ㄤ笂鍒涘緩涓涓柊欏圭洰錛屾瘮濡?GitCafe銆?/p>

    3). 浠ラ暅鍍忔帹閫佺殑鏂瑰紡涓婁紶浠g爜鍒?GitCafe 鏈嶅姟鍣ㄤ笂銆?/p>

    cd project.git

    git push --mirror git@gitcafe.com/username/newproject.git

    4). 鍒犻櫎鏈湴浠g爜

    cd ..

    rm -rf project.git

    5). 鍒版柊鏈嶅姟鍣?GitCafe 涓婃壘鍒?Clone 鍦板潃錛岀洿鎺?Clone 鍒版湰鍦板氨鍙互浜嗐?/p>

    git clone git@gitcafe.com/username/newproject.git

    榪欑鏂瑰紡鍙互淇濈暀鍘熺増鏈簱涓殑鎵鏈夊唴瀹廣?/p>




    X-Spirit 2012-11-12 18:58 鍙戣〃璇勮
    ]]>銆愯漿銆戦槄璇繪垜浠殑瀛︾鈥斺旇綆楁満涓撲笟瀛︿範嫻呰皥http://www.tkk7.com/zhangwei217245/archive/2012/10/04/389041.htmlX-SpiritX-SpiritThu, 04 Oct 2012 13:54:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2012/10/04/389041.htmlhttp://www.tkk7.com/zhangwei217245/comments/389041.htmlhttp://www.tkk7.com/zhangwei217245/archive/2012/10/04/389041.html#Feedback1http://www.tkk7.com/zhangwei217245/comments/commentRss/389041.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/389041.html闃呰鍏ㄦ枃

    X-Spirit 2012-10-04 21:54 鍙戣〃璇勮
    ]]>
    銆怲ech Details銆戙愯漿銆戞湁鍏矹ava SPI鏈哄埗http://www.tkk7.com/zhangwei217245/archive/2012/03/03/410530.htmlX-SpiritX-SpiritSat, 03 Mar 2012 03:34:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2012/03/03/410530.htmlhttp://www.tkk7.com/zhangwei217245/comments/410530.htmlhttp://www.tkk7.com/zhangwei217245/archive/2012/03/03/410530.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/410530.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/410530.html
    杞嚜錛歨ttp://blog.csdn.net/fenglibing/article/details/7083071

    涓涓湇鍔?service)閫氬父鎸囩殑鏄凡鐭ョ殑鎺ュ彛鎴栬呮娊璞$被錛屾湇鍔℃彁渚涙柟灝辨槸瀵硅繖涓帴鍙f垨鑰呮娊璞$被鐨勫疄鐜幫紝鐒跺悗鎸塻pi鏍囧噯瀛樻斁鍒拌祫婧愯礬寰凪ETA-INF/services鐩綍涓嬶紝鏂囦歡鐨勫懡鍚嶄負璇ユ湇鍔℃帴鍙g殑鍏ㄩ檺瀹氬悕銆傚鏈変竴涓湇鍔℃帴鍙om.test.Service錛屽叾鏈嶅姟瀹炵幇綾諱負com.test.ChildService錛岄偅姝ゆ椂闇瑕佸湪META-INF/services涓斁緗枃浠禼om.test.Service錛屽叾涓殑鍐呭灝變負璇ュ疄鐜扮被鐨勫叏闄愬畾鍚峜om.test.ChildService錛屾湁澶氫釜鏈嶅姟瀹炵幇錛屾瘡涓琛屽啓涓涓湇鍔″疄鐜幫紝#鍚庨潰鐨勫唴瀹逛負娉ㄩ噴錛屽茍涓旇鏂囦歡鍙兘澶熸槸浠TF-8緙栫爜銆?/span>
        榪欑瀹炵幇鏂瑰紡錛屾劅瑙夊拰鎴戜滑閫氬父鐨勫紑鍙戞柟寮忓樊涓嶅錛岄兘鏄畾涔変竴涓帴鍙o紝鐒跺悗瀛愮被瀹炵幇鐖剁被涓畾涔夌殑鏂規硶錛屼負浠涔堣鎼炶繖涔堜竴濂楁爣鍑嗕互鍙婂崟鐙悶涓涓厤緗枃浠訛紵榪欑鏂瑰紡涓昏鏄拡瀵逛笉鍚岀殑鏈嶅姟鎻愪緵鍘傚晢錛屽涓嶅悓鍦烘櫙鐨勬彁渚涗笉鍚岀殑瑙e喅鏂規鍒跺畾鐨勪竴濂楁爣鍑嗭紝涓句釜綆鍗曠殑渚嬪瓙錛屽鐜板湪鐨凧DK涓湁鏀寔闊充箰鎾斁錛屽亣璁懼彧鏀寔mp3鐨勬挱鏀撅紝鏈変簺鍘傚晢鎯沖湪榪欎釜鍩虹涔嬩笂鏀寔mp4鐨勬挱鏀撅紝鏈夌殑鎯蟲敮鎸乵p5錛岃岃繖浜涘巶鍟嗛兘鏄涓夋柟鍘傚晢錛屽鏋滄病鏈夋彁渚汼PI榪欑瀹炵幇鏍囧噯錛岄偅灝卞彧鏈変慨鏀笿AVA鐨勬簮浠g爜浜嗭紝閭h繖涓紛绔篃鏄樉鑰屾槗瑙佺殑錛屼篃灝辨槸涓嶈兘澶熼殢鐫JDK鐨勫崌綰ц屽崌綰х幇鍦ㄧ殑搴旂敤浜嗭紝鑰屾湁浜哠PI鏍囧噯錛孲UN鍏徃鍙渶瑕佹彁渚涗竴涓挱鏀炬帴鍙o紝鍦ㄥ疄鐜版挱鏀劇殑鍔熻兘涓婇氳繃ServiceLoad鐨勬柟寮忓姞杞芥湇鍔★紝閭d箞絎笁鏂瑰彧闇瑕佸疄鐜拌繖涓挱鏀炬帴鍙o紝鍐嶆寜SPI鏍囧噯榪涜鎵撳寘鎴恓ar錛屽啀鏀懼埌classpath涓嬮潰灝監K浜嗭紝娌℃湁涓鐐逛唬鐮佺殑渚靛叆鎬с?/span>

        浠ヤ笅鏄壘鍒扮殑鍑犵瘒鏂囩珷錛?/p>

        1銆?a target="_blank" style="color: #ca0000; text-decoration: none;">http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html錛岃繖涓槸瀹樻柟鐨勬枃妗o紝鏈夊service鐨勮緇嗕粙緇嶏紝鍖呮嫭瑙勮寖浠ュ強涓涓畝鍗曠殑紺轟緥錛岃繖涓槸瀛︿範SPI蹇呴』鐪嬬殑鏂囨。錛?/p>

        娉細http://docs.oracle.com/javase/1.4.2/docs/guide/jar/jar.html#Service%20Provider錛岃繖涓槸1.4涓Service Provider鐨勪粙緇嶏紝鍔犺澆鏈嶅姟鏄氳繃sun.misc.Service榪涜鍔犺澆鐨勶紝榪欎釜涔熸湁鐩稿簲鐨勭ず渚嬶紝鐓у仛灝監K錛?/p>

        2銆丣ava鐨凷PI鏈哄埗錛?a target="_blank" style="color: #ca0000; text-decoration: none;">http://www.2cto.com/kf/201012/79868.html錛岃繖涓槸鍥戒漢鍐欑殑涓綃囩ず渚嬫枃绔狅紝涔熸尯涓嶉敊錛岄噷闈篃鏈変竴涓畝鍗曠殑紺轟緥錛?/p>

        3銆丏eveloping a Service Provider using Java API(Service Provider Interface)錛?a style="color: #ca0000; text-decoration: none;">http://blog.csdn.net/fenglibing/article/details/7083526錛岃繖綃囨枃绔犳槸杞殑alexa鍙戣〃鍦╞logspot涓婇潰鐨勶紝涔熸槸涓涓紑鍙慡PI鐨勭ず渚嬶紝鏈夊叴瓚g殑涔熷彲浠ョ湅鐪嬶紱

        4銆丄dd Mp3 capabilities to Java Sound with SPI錛?a target="_blank" style="color: #ca0000; text-decoration: none;">http://www.javaworld.com/javaworld/jw-11-2000/jw-1103-mp3.html錛岃繖鏄竴涓瘮杈冭佺殑渚嬪瓙錛屽熀浜巎dk1.3鐨勶紝鍥犱負鍦╦dk1.3鐨勬椂鍊欒繕娌℃湁鏀寔mp3鏍煎紡錛屽彧鏀寔AU, AIF, MIDI, and WAV絳夋牸寮忥紝涔熸槸涓涓煎緱鍙傝冪殑紺轟緥銆?/p>

        鎴戣繖杈逛篃鍐欎簡涓涓畝鍗曞緱涓嶈兘澶熷啀綆鍗曠殑紺轟緥錛屾簮鐮佸彲浠ヨ繖閲屼笅杞斤細http://download.csdn.net/detail/fenglibing/3939882




    鏈鍚庡緢閲嶈涓鐐癸細


    濡傛灉鎯寵瑕嗙洊鏌愪釜Provider錛屽彲浠ュ湪瀵瑰簲鐨凪ETA-INF/services鐨勯厤緗枃浠朵腑鍔犱笂鏂皊ervice鐨勪竴琛岋紝鎴栬呬篃鍙互鍐欏湪鍙︿竴涓湁渚濊禆鍏崇郴鐨刯ar鍖呬腑錛屽彧瑕佸拰鍘熸潵鐨凱rovider鍛藉悕涓嶅悓鍗沖彲銆傚姞杞介『搴忎笂鍙互鑰冭檻浣跨敤@Priority娉ㄨВ鏉ヨ皟鏁村姞杞界殑浼樺厛綰с?/p>



    @import url(http://www.tkk7.com/CuteSoft_Client/CuteEditor/Load.ashx?type=style&file=SyntaxHighlighter.css);@import url(/css/cuteeditor.css);

    X-Spirit 2012-03-03 11:34 鍙戣〃璇勮
    ]]>
    銆怑fficiency銆?鐩戞帶 Linux 鎬ц兘鐨?18 涓懡浠よ宸ュ叿http://www.tkk7.com/zhangwei217245/archive/2012/02/19/410062.htmlX-SpiritX-SpiritSun, 19 Feb 2012 14:16:00 GMThttp://www.tkk7.com/zhangwei217245/archive/2012/02/19/410062.htmlhttp://www.tkk7.com/zhangwei217245/comments/410062.htmlhttp://www.tkk7.com/zhangwei217245/archive/2012/02/19/410062.html#Feedback0http://www.tkk7.com/zhangwei217245/comments/commentRss/410062.htmlhttp://www.tkk7.com/zhangwei217245/services/trackbacks/410062.html

    杞嚜錛?/p>

    http://blog.jobbole.com/59790/

     


    瀵逛簬緋葷粺鍜岀綉緇滅鐞嗗憳鏉ヨ姣忓ぉ鐩戞帶鍜岃皟璇昄inux緋葷粺鐨勬ц兘闂鏄竴欏圭箒閲嶇殑宸ヤ綔銆傚湪IT棰嗗煙浣滀負涓鍚峀inux緋葷粺鐨勭鐞嗗憳宸ヤ綔5騫村悗錛屾垜閫愭笎 璁よ瘑鍒扮洃鎺у拰淇濇寔緋葷粺鍚姩騫惰繍琛屾槸澶氫箞鐨勪笉瀹規槗銆傚熀浜庢鍘熷洜錛屾垜浠凡緙栧啓浜嗘渶甯鎬嬌鐢ㄧ殑18涓懡浠よ宸ュ叿鍒楄〃錛岃繖浜涘伐鍏峰皢鏈夊姪浜庢瘡涓狶inux/Unix 緋葷粺綆$悊鍛樼殑宸ヤ綔銆傝繖浜涘懡浠よ宸ュ叿鍙互鍦ㄥ悇縐峀inux緋葷粺涓嬩嬌鐢紝鍙互鐢ㄤ簬鐩戞帶鍜屾煡鎵句駭鐢熸ц兘闂鐨勫師鍥犮傝繖涓懡浠よ宸ュ叿鍒楄〃鎻愪緵浜嗚凍澶熺殑宸ュ叿錛屾偍鍙互 鎸戦夐傜敤浜庢偍鐨勭洃鎺у満鏅殑宸ュ叿銆?/p>

    1.Top-Linux榪涚▼鐩戞帶

    Linux涓嬬殑Top鍛戒護鏄竴涓ц兘鐩戞帶紼嬪簭錛岃澶氱郴緇熺鐞嗗憳甯稿父鐢ㄥ畠鏉ョ洃鎺inux鎬ц兘錛屽湪璁稿Linux鎴栬呯被Unix鎿嶄綔緋葷粺閲岄兘鏈夎繖涓懡浠ゃ俆op鍛戒護鐢ㄤ簬鎸変竴瀹氱殑欏哄簭鏄劇ず鎵鏈夋鍦ㄨ繍琛岃屼笖澶勪簬媧誨姩鐘舵佺殑瀹炴椂榪涚▼錛岃屼笖浼氬畾鏈熸洿鏂版樉紺虹粨鏋溿傝繖鏉″懡浠ゆ樉紺轟簡CPU鐨勪嬌鐢ㄧ巼銆佸唴瀛樹嬌鐢ㄧ巼銆佷氦鎹㈠唴瀛樹嬌鐢ㄥぇ灝忋侀珮閫熺紦瀛樹嬌鐢ㄥぇ灝忋佺紦鍐插尯浣跨敤澶у皬錛岃繘紼婸ID銆佹墍浣跨敤鍛戒護浠ュ強鍏朵粬銆傚畠榪樺彲浠ユ樉紺烘鍦ㄨ繍琛岃繘紼嬬殑鍐呭瓨鍜孋PU鍗犵敤澶氱殑鎯呭喌銆傚緋葷粺綆$悊鍛樻潵璇達紝top鍛戒護寮忔槸涓涓潪甯告湁鐢ㄧ殑錛屽畠鍙敤浜庣洃鎺х郴緇熷茍鍦ㄩ渶瑕佺殑鏃跺欓噰鍙栨紜殑澶勭悊鍔ㄤ綔銆傝鎴戜滑鐪嬬湅瀹為檯涓殑top鍛戒護銆?/p>

    # top

    13115558_AIkI
    Top鍛戒護涓句緥
    鏈夊叧Top鍛戒護鏇村鐨勪緥瀛愶紝璇烽槄璇?/strong> :Linux涓?2涓嬌鐢═op鍛戒護鐨勪緥瀛?/a>銆?/p>

    2. VmStat – 铏氭嫙鍐呭瓨緇熻

    Linux 鐨?nbsp;VmStat 鍛戒護鐢ㄤ簬鏄劇ず铏氭嫙鍐呭瓨銆?strong>鍐呮牳綰跨▼銆?strong>紓佺洏銆?strong>緋葷粺榪涚▼銆?strong>I/O 鍧?/strong>銆?strong>涓柇銆?strong>CPU 媧誨姩 絳夌殑緇熻淇℃伅銆傜己鐪佹儏鍐典笅錛?vmstat 鍛戒護鍦?Linux 緋葷粺涓嬩笉鍙敤錛屼綘闇瑕佸畨瑁呬竴涓寘鍚簡 vmstat 紼嬪簭鐨?nbsp;sysstat 杞歡鍖呫傚懡浠ゆ牸寮忕殑甯歌鐢ㄦ硶鏄細

    1
    2
    3
    4
    # vmstat
    procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----
     r  b   swpd   free  inact active   si   so    bi    bo   in   cs us sy id wa st
     1  0      0 810420  97380  70628    0    0   115     4   89   79  1  6 90  3  0

    鏇村鐨?vmstat 渚嬪瓙錛岃闃呰 : 6 Linux 涓嬬殑 Vmstat 鍛戒護瀹炰緥

    3.Lsof-鍒楀嚭鎵撳紑鐨勬枃浠?/h2>

    鍦ㄨ澶歀inux鎴栬呯被Unix緋葷粺閲岄兘鏈塴sof鍛戒護錛屽畠甯哥敤浜庝互鍒楄〃鐨勫艦寮忔樉紺烘墍鏈夋墦寮鐨勬枃浠跺拰榪涚▼銆傛墦寮鐨勬枃浠跺寘鎷?strong>紓佺洏鏂囦歡銆佺綉緇滃鎺ュ瓧銆佺閬撱佽澶囧拰榪涚▼銆備嬌鐢ㄨ繖鏉″懡浠ょ殑涓昏鎯呭艦涔嬩竴灝辨槸鍦ㄦ棤娉曟寕杞界鐩樺拰鏄劇ず姝e湪浣跨敤鎴栬呮墦寮鏌愪釜鏂囦歡鐨勯敊璇俊鎭殑鏃跺欍備嬌鐢ㄨ繖鏉″懡浠わ紝浣犲彲浠ュ緢瀹規槗鍦扮湅鍒版鍦ㄤ嬌鐢ㄥ摢涓枃浠躲傝繖鏉″懡浠ゆ渶甯哥敤鐨勬牸寮忓涓嬶細

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    # lsof
    COMMAND     PID      USER   FD      TYPE     DEVICE     SIZE       NODE NAME
    init          1      root  cwd       DIR      104,2     4096          2 /
    init          1      root  rtd       DIR      104,2     4096          2 /
    init          1      root  txt       REG      104,2    38652   17710339 /sbin/init
    init          1      root  mem       REG      104,2   129900     196453 /lib/ld-2.5.so
    init          1      root  mem       REG      104,2  1693812     196454 /lib/libc-2.5.so
    init          1      root  mem       REG      104,2    20668     196479 /lib/libdl-2.5.so
    init          1      root  mem       REG      104,2   245376     196419 /lib/libsepol.so.1
    init          1      root  mem       REG      104,2    93508     196431 /lib/libselinux.so.1
    init          1      root   10u     FIFO       0,17                 953 /dev/initctl

    鏈夊叧lsof鍛戒護鐨勭敤娉曞拰渚嬪瓙鐨勬洿澶氫俊鎭紝璇峰弬鑰?/strong>錛?Linux涓?0涓嬌鐢╨sof鍛戒護鐨勪緥瀛?/a>銆?/p>

    4.Tcpdump-緗戠粶鍖呭垎鏋愬櫒

    Tcpdump鏄渶騫挎硾浣跨敤鐨?strong>緗戠粶鍖呭垎鏋愬櫒鎴栬呭寘鐩戞帶紼嬪簭涔嬩竴錛屽畠鐢ㄤ簬鎹曟崏鎴栬呰繃婊ょ綉緇滀笂鎸囧畾鎺ュ彛涓婃帴鏀舵垨鑰呬紶杈撶殑TCP/IP鍖呫傚畠榪樻湁涓涓夐」鐢ㄤ簬鎶婃崟鎹夊埌鐨勫寘淇濆瓨鍒版枃浠墮噷錛屼互渚夸互鍚庤繘琛屽垎鏋愩傚湪鍑犱箮鎵鏈変富瑕佺殑Linux鍙戝竷閲岋紝tcpdump閮藉彲浠ヤ嬌鐢ㄣ?/p>

    1
    2
    3
    4
    5
    # tcpdump -i eth0tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
    22:08:59.617628 IP tecmint.com.ssh > 115.113.134.3.static-mumbai.vsnl.net.in.28472: P 2532133365:2532133481(116) ack 3561562349 win 9648
    22:09:07.653466 IP tecmint.com.ssh > 115.113.134.3.static-mumbai.vsnl.net.in.28472: P 116:232(116) ack 1 win 9648
    22:08:59.617916 IP 115.113.134.3.static-mumbai.vsnl.net.in.28472 > tecmint.com.ssh: . ack 116 win 64347

    瑕佹兂鑾峰緱鏇村鏈夊叧tcpdump鐢ㄦ硶鐨勪俊鎭紝璇峰弬闃?/strong>錛?Linux涓?2涓嬌鐢═cpdump鍛戒護鐨勪緥瀛愩?/a>

    5.Netstat-緗戠粶鐘舵佺粺璁?/h2>

    Netstat鏄竴涓敤浜庣洃鎺?strong>榪涘嚭緗戠粶鐨勫寘鍜岀綉緇滄帴鍙g粺璁$殑鍛戒護琛屽伐鍏楓傚畠鏄竴涓潪甯告湁鐢ㄧ殑宸ュ叿錛岀郴緇熺鐞嗗憳鍙互鐢ㄦ潵鐩戞帶緗戠粶鎬ц兘錛屽畾浣嶅茍瑙e喅緗戠粶鐩稿叧闂銆?/p>

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # netstat -a | moreActive Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State
    tcp        0      0 *:mysql                     *:*                         LISTEN
    tcp        0      0 *:sunrpc                    *:*                         LISTEN
    tcp        0      0 *:realm-rusd                *:*                         LISTEN
    tcp        0      0 *:ftp                       *:*                         LISTEN
    tcp        0      0 localhost.localdomain:ipp   *:*                         LISTEN
    tcp        0      0 localhost.localdomain:smtp  *:*                         LISTEN
    tcp        0      0 localhost.localdomain:smtp  localhost.localdomain:42709 TIME_WAIT
    tcp        0      0 localhost.localdomain:smtp  localhost.localdomain:42710 TIME_WAIT
    tcp        0      0 *:http                      *:*                         LISTEN
    tcp        0      0 *:ssh                       *:*                         LISTEN
    tcp        0      0 *:https                     *:*                         LISTEN

    鏈夊叧Netstat鏇村鐨勪緥瀛愶紝璇峰弬闃?/strong>: Linux涓?0涓嬌鐢∟etstat鍛戒護鐨勪緥瀛愩?/a>

    6. Htop – Linux榪涚▼鐩戞帶

    Htop 鏄竴涓潪甯擱珮綰х殑浜や簰寮忕殑瀹炴椂linux榪涚▼鐩戞帶宸ュ叿銆? 瀹冨拰top鍛戒護鍗佸垎鐩鎬技錛屼絾鏄畠鍏鋒湁鏇翠赴瀵岀殑鐗規э紝渚嬪鐢ㄦ埛鍙互鍙嬪ソ鍦扮鐞嗚繘紼嬶紝蹇嵎閿紝鍨傜洿鍜屾按騫蟲柟寮忔樉紺鴻繘紼嬬瓑絳夈? Htop鏄竴涓涓夋柟宸ュ叿錛屽畠涓嶅寘鍚湪linux緋葷粺涓紝浣犻渶瑕佷嬌鐢╕UM鍖呯鐞嗗伐鍏峰幓瀹夎瀹冦?鍏充簬瀹夎鐨勬洿澶氫俊鎭紝璇烽槄璇諱笅鏂?

    # htop

    13115601_fiol

    Htop 鍛戒護紺轟緥鎴浘

    瀵逛簬Htop鐨勫畨瑁咃紝璇瘋 : 鍦↙inux瀹夎Htop(Linux榪涚▼鐩戞帶)

    7.Iotop-鐩戞帶Linux紓佺洏I/O

    Iotop鍛戒護鍚屾牱涔熼潪甯哥被浼間簬top鍛戒護鍜?strong>Htop紼嬪簭錛屼笉榪囧畠鍏鋒湁鐩戞帶騫舵樉紺哄疄鏃?strong>紓佺洏I/O鍜岃繘紼?/strong>鐨勭粺璁″姛鑳姐傚湪鏌ユ壘鍏蜂綋榪涚▼鍜屽ぇ閲忎嬌鐢ㄧ鐩樿鍐欒繘紼嬬殑鏃跺欙紝榪欎釜宸ュ叿灝遍潪甯告湁鐢ㄣ?/p>

    # iotop

    13115602_F9DG Iotop鍛戒護涓句緥鐨勬埅鍥?br /> 鏈夊叧濡備綍瀹夎鍜屼嬌鐢╥otop鐨勪俊鎭紝璇烽槄璇?/strong>錛?鍦↙inux涓嬪畨瑁匢otop銆?/a>

    8.Iostat-杈撳叆/杈撳嚭緇熻

    Iostat鏄竴涓敤浜庢敹闆嗘樉紺虹郴緇熷瓨鍌ㄨ澶?strong>杈撳叆鍜岃緭鍑?/strong>鐘舵佺粺璁$殑綆鍗曞伐鍏楓傝繖涓伐鍏峰父甯哥敤鏉ヨ拷韙瓨鍌ㄨ澶囩殑鎬ц兘闂錛屽叾涓瓨鍌ㄨ澶囧寘鎷?strong>璁懼銆佹湰鍦扮鐩橈紝浠ュ強璇稿浣跨敤NFS絳夌殑榪滅紓佺洏銆?/p>

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    # iostat
    Linux 2.6.18-238.9.1.el5 (tecmint.com)         09/13/2012
     
    avg-cpu:  %user   %nice %system %iowait  %steal   %idle
               2.60    3.65    1.04    4.29    0.00   88.42
     
    Device:            tps   Blk_read/s   Blk_wrtn/s   Blk_read   Blk_wrtn
    cciss/c0d0       17.79       545.80       256.52  855159769  401914750
    cciss/c0d0p1      0.00         0.00         0.00       5459       3518
    cciss/c0d0p2     16.45       533.97       245.18  836631746  384153384
    cciss/c0d0p3      0.63         5.58         3.97    8737650    6215544
    cciss/c0d0p4      0.00         0.00         0.00          8          0
    cciss/c0d0p5      0.63         3.79         5.03    5936778    7882528
    cciss/c0d0p6      0.08         2.46         2.34    3847771    3659776

    鏈夊叧iostat鐢ㄦ硶鍜屼婦渚嬬殑鏇村淇℃伅錛岃璁塊棶: Linux涓?涓嬌鐢╥ostat鍛戒護鐨勪緥瀛?/a>銆?/p>

    9.IPTraf-瀹炴椂灞鍩熺綉IP鐩戞帶

    IPTraf鏄竴涓湪Linux鎺у埗鍙拌繍琛岀殑銆佸紑鏀炬簮浠g爜鐨勫疄鏃剁綉緇滐紙灞鍩熺綉錛夌洃鎺у簲鐢ㄣ傚畠閲囬泦浜嗗ぇ閲忎俊鎭紝姣斿閫氳繃緗戠粶鐨処P嫻侀噺鐩戞帶錛屽寘鎷琓CP鏍囪銆両CMP璇︾粏淇℃伅銆乀CP/UDP嫻侀噺鍒嗙銆乀CP榪炴帴鍖呭拰瀛楄妭鏁般傚悓鏃惰繕閲囬泦鏈夊叧鎺ュ彛鐘舵佺殑甯歌淇℃伅鍜岃緇嗕俊鎭細TCP銆乁DP銆両P銆両CMP銆侀潪IP錛孖P鏍¢獙鍜岄敊璇紝鎺ュ彛媧誨姩絳夈?/p>

    420140219110741

    IP嫻侀噺鐩戞帶
    鏈夊叧IPTraf宸ュ叿鐢ㄦ硶浠ュ強鍏朵粬鏇村淇℃伅錛岃璁塊棶錛?/strong> IPTraf緗戠粶鐩戞帶宸ュ叿銆?/p>

    10. psacct 鎴栬?acct – 鐩戣鐢ㄦ埛媧誨姩

    psacct鎴栬卆cct宸ュ叿鐢ㄤ簬鐩戣緋葷粺閲屾瘡涓敤鎴風殑媧誨姩鐘跺喌銆傝繖涓や釜鏈嶅姟榪涚▼榪愯鍦ㄥ悗鍙幫紝瀹冧滑瀵圭郴緇熶笂榪愯鐨勬瘡涓敤鎴風殑鎵鏈夋椿鍔ㄨ繘琛岃繎璺濈鐩戣錛屽悓鏃惰繕鐩戣榪欎簺媧誨姩鎵浣跨敤鐨勮祫婧愭儏鍐點?/p>

    緋葷粺綆$悊鍛樺彲浠ヤ嬌鐢ㄨ繖涓や釜宸ュ叿璺熻釜姣忎釜鐢ㄦ埛鐨勬椿鍔紝姣斿鐢ㄦ埛姝e湪鍋氫粈涔堬紝浠栦滑鎻愪氦浜嗛偅浜涘懡浠わ紝浠栦滑浣跨敤浜嗗灝戣祫婧愶紝浠栦滑鍦ㄧ郴緇熶笂鎸佺畫浜嗗闀挎椂闂寸瓑絳夈?/p>

    鏈夊叧榪欎簺鍛戒護鐨勫畨瑁呭拰鐢ㄦ硶涓句緥淇℃伅錛岃鍙傞槄鏂囩珷錛?a target="_blank" rel="nofollow">浣跨敤psacct鎴栬卆cct鐩戣鐢ㄦ埛媧誨姩銆?/p>

    11.Monit – Linux榪涚▼鍜屾湇鍔$洃鎺у伐鍏?/h3>

    Monit鏄竴涓厤璐圭殑寮婧愯蔣浠訛紝涔熸槸涓涓熀浜庣綉緇滅殑榪涚▼鐩戞帶宸ュ叿銆傚畠鑳借嚜鍔ㄧ洃鎺у拰綆$悊緋葷粺榪涚▼錛岀▼搴忥紝鏂囦歡錛屾枃浠跺す錛屾潈闄愶紝鎬誨拰楠岃瘉鐮佸拰鏂囦歡緋葷粺銆?/p>

    榪欎釜杞歡鑳界洃鎺у儚Apache, MySQL, Mail, FTP, ProFTP, Nginx, SSH榪欐牱鐨勬湇鍔°備綘鍙互閫氳繃鍛戒護琛屾垨鑰呰繖涓蔣浠舵彁渚涚殑緗戠粶鍊熷彛鏉ユ煡鐪嬬郴緇熺姸鎬併?/p>

    13115605_Gvjb

    Monit Linux緋葷粺鐩戞帶

    鏇村鍐呭璇峰弬闃咃細鐢∕onit鐩戞帶Linux榪涚▼

    12.NetHogs-鐩戣姣忎釜榪涚▼浣跨敤鐨勭綉緇滃甫瀹?/h2>

    NetHogs鏄竴涓紑鏀炬簮婧愪唬鐮佺殑寰堝皬紼嬪簭錛堜笌Linux涓嬬殑top鍛戒護寰堢浉浼鹼級錛屽畠瀵嗗垏鐩戣鐫緋葷粺涓婃瘡涓繘紼嬬殑緗戠粶媧誨姩銆傚悓鏃惰繕榪借釜鐫姣忎釜紼嬪簭鎴栬呭簲鐢ㄦ墍浣跨敤鐨勫疄鏃剁綉緇滃甫瀹姐?/p>

    13115606_C06o

    NetHogs錛歀inux涓嬬殑甯﹀鐩戣
    鏇村淇℃伅璇峰弬闃咃細 浣跨敤NetHogs鐩戣Linux鐨勭綉緇滃甫瀹戒嬌鐢ㄧ姸鍐點?/a>

    13.iftop-鐩戣緗戠粶甯﹀

    iftop鏄彟涓涓湪鎺у埗鍙拌繍琛岀殑寮鏀炬簮浠g爜緋葷粺鐩戞帶搴旂敤錛屽畠鏄劇ず浜嗙郴緇熶笂閫氳繃緗戠粶鎺ュ彛鐨勫簲鐢ㄧ綉緇滃甫瀹戒嬌鐢紙婧愪富鏈烘垨鑰呯洰鐨勪富鏈猴級鐨勫垪琛紝榪欎釜鍒楄〃瀹氭湡鏇存柊銆俰ftop鐢ㄤ簬鐩戣緗戠粶鐨勪嬌鐢ㄦ儏鍐碉紝鑰?strong>‘top’鐢ㄤ簬鐩戣CPU鐨勪嬌鐢ㄦ儏鍐點俰ftop鏄?strong>‘top’宸ュ叿緋誨垪涓殑涓鍛橈紝瀹冪敤浜庣洃瑙嗘墍閫夋帴鍙o紝騫舵樉紺轟袱涓富鏈洪棿褰撳墠緗戠粶甯﹀鐨勪嬌鐢ㄦ儏鍐點?/p>

    720140219110814

    iftop-鐩戣緗戠粶甯﹀銆?/p>

    鏇村淇℃伅璇峰弬闃咃細iftop-鐩戣緗戠粶甯﹀鐨勪嬌鐢ㄦ儏鍐?/a>銆?/p>

    14 Monitorix-緋葷粺鍜岀綉緇滅洃鎺?/strong>

    Monitorix 鏄竴涓厤璐圭殑杞婚噺綰у簲鐢ㄥ伐鍏鳳紝瀹冪殑璁捐鍒濊》鏄繍琛屽拰鐩戞帶Linux/Unix鏈嶅姟鍣ㄧ郴緇熷拰璧勬簮絳夈傚畠鏈変竴涓狧TTP 緗戠粶鏈嶅姟鍣紝榪欎釜鏈嶅姟鍣ㄦ湁瑙勫緥鐨勬敹闆嗙郴緇熷拰緗戠粶鐨勪俊鎭茍浠ュ浘褰㈠寲鐨勫艦寮忓睍紺哄嚭鏉ャ傚畠鐩戞帶緋葷粺鐨勫鉤鍧囪礋杞藉拰浣跨敤錛屽唴瀛樺垎閰嶃佺鐩樺仴搴風姸鍐點佺郴緇熸湇鍔°佺綉緇滅 鍙c侀偖浠剁粺璁★紙Sendmail錛孭ostfix,Dovecot絳夛級錛孧ySQL緇熻錛岀瓑絳夈傚畠灝辨槸鐢ㄦ潵鐩戞帶緋葷粺鐨勬諱綋鎬ц兘錛屽府鍔╁彂鐜板け璇佺摱棰堝拰寮傚父 媧誨姩鐨勩?/p>

    820140219110833

    15. Arpwatch – 浠ュお緗戞椿鍔ㄧ洃瑙嗗櫒

    Arpwatch琚璁$敤鏉ョ洃鎺inux涓婄殑浠ュお緗戝湴鍧瑙f瀽 (MAC鍜?strong>IP鍦板潃鐨勫彉鍖?銆備粬鍦ㄤ竴孌墊椂闂村唴鎸佺畫鐩戞帶浠ュお緗戞椿鍔ㄥ茍杈撳嚭IP鍜孧AC鍦板潃閰嶅鍙樺姩鐨勬棩蹇椼傚畠榪樺彲浠ュ悜綆$悊鍛樺彂閫侀偖浠墮氱煡錛屽鍦板潃閰嶅鐨勫鏀瑰彂鍑鴻鍛娿傝繖瀵逛簬媯嫻嬬綉緇滀笂鐨凙RP鏀誨嚮寰堟湁鐢ㄣ?/p>

    鏇村淇℃伅璇峰弬闃?/strong> : Arpwatch to Monitor Ethernet Activity

    16. Suricata – 緗戠粶瀹夊叏鐩戞帶

    Suricata 鏄竴涓紑婧愮殑楂樻ц兘緗戠粶瀹夊叏銆佸叆渚墊嫻嬪拰鍙嶇洃嫻嬪伐鍏鳳紝鍙互榪愯Linux銆丗reeBSD鍜學indows涓娿傞潪钀ュ埄緇勭粐OISF (Open Information Security Foundation)寮鍙戝茍鎷ユ湁鍏剁増鏉冦?/p>

    鏇村淇℃伅璇峰弬闃?/strong> : Suricata – A Network Intrusion Detection and Prevention System

    17. VnStat PHP – 緗戠粶嫻侀噺鐩戞帶

    VnStat PHP 鏄祦琛岀綉緇滃伐鍏?#8221;vnstat”鐨勫熀浜巜eb鐨勫墠绔憟鐜般?strong>VnStat PHP 灝嗙綉緇滀嬌鐢ㄦ儏鍐靛憟鐜板湪婕備寒鐨勫浘褰㈢晫闈腑銆備粬鍙互鏄劇ず浠ュ皬鏃躲佹棩銆佹湀璁$殑涓婁紶鍜屼笅杞芥祦閲忓茍杈撳嚭鎬葷粨鎶ュ憡銆?/p>

    鏇村淇℃伅璇峰弬闃?/strong> : VnStat PHP – Monitoring Network Bandwidth

    18. Nagios – 緗戠粶/鏈嶅姟鍣ㄧ洃鎺?/h3>

    Nagios鏄鍏堣屽己澶х殑寮婧愮洃鎺х郴緇燂紝浠栧彲浠ヨ緗戠粶/緋葷粺綆$悊鍛樺湪闂褰卞搷鍒版甯哥殑涓氬姟涔嬪墠鍙戠幇騫惰В鍐沖畠浠傛湁浜哊agios緋葷粺錛岀鐞嗗憳鍙互 鍦ㄥ崟涓獥鍙e唴榪滅▼媯嫻婰inux銆乄indows銆佸紑鍏熾佽礬鐢卞櫒鍜屾墦鍗版満銆傚畠鍙互鍗遍櫓璀﹀憡騫舵寚鍑虹郴緇?鏈嶅姟鍣ㄦ槸鍚︽湁寮傚父錛岃繖鍙互闂存帴甯姪浣犲湪闂鍙戠敓涔嬪墠 閲囧彇鎶㈡晳鎺柦銆?/p>

    鏇村淇℃伅璇峰弬闃?/strong> : Install Nagios Monitoring System to Monitor Remote Linux/Windows Hosts

    鎴戜滑鎯崇煡閬擄細浣犲湪鐢ㄤ粈涔堢洃鎺х▼搴忔潵鐩戞帶Linux鏈嶅姟鍣ㄧ殑鎬ц兘鍛紵濡傛灉鎴戜滑鍦ㄤ笂闈㈤敊榪囦簡浣犺涓洪噸瑕佺殑宸ュ叿錛岃鍦ㄨ瘎璁轟腑鍛婅瘔鎴戜滑錛屼笉瑕佸繕浜嗗垎浜畠錛?/p>



    X-Spirit 2012-02-19 22:16 鍙戣〃璇勮
    ]]>
    銆怑ffective銆慙ogging鏈浣沖疄璺?/title><link>http://www.tkk7.com/zhangwei217245/archive/2011/02/12/409787.html</link><dc:creator>X-Spirit</dc:creator><author>X-Spirit</author><pubDate>Sat, 12 Feb 2011 11:55:00 GMT</pubDate><guid>http://www.tkk7.com/zhangwei217245/archive/2011/02/12/409787.html</guid><wfw:comment>http://www.tkk7.com/zhangwei217245/comments/409787.html</wfw:comment><comments>http://www.tkk7.com/zhangwei217245/archive/2011/02/12/409787.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/zhangwei217245/comments/commentRss/409787.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/zhangwei217245/services/trackbacks/409787.html</trackback:ping><description><![CDATA[<div><div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><strong>#鎰忚瘑</strong></div> <p><strong style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"><span style="color: #0000ff; font-size: medium;">ASAP (As Soon As Possible)鍘熷垯</span></strong></p> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">褰撶嚎涓婂嚭鐜拌寮傞棶棰橈紝</div> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">褰撲綘鎰忚瘑鍒伴潬鐜版湁鐨勬棩蹇楁棤娉曞畾浣嶉棶棰樻椂錛?/div> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">褰撶幇璞¢毦浠ュ湪浣犵殑寮鍙戠幆澧冮噸鐜版椂錛?/div> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">璇蜂笉瑕佹墽钁椾簬鏋潗鑲夌溂鐪嬩唬鐮侊紝鍥犱負錛氫竴錛変笉涓瀹氭槸浣犱唬鐮侀昏緫闂錛屽彲鑳芥槸鑴忔暟鎹犳垚鐨勶紝鏄佷笟鍔℃暟鎹犳垚鐨勶紝鏄垎甯冨紡鐜閫犳垚鐨勶紝鏄叾浠栧瓙緋葷粺閫犳垚鐨勶紱浜岋級綰夸笂涓氬姟澶勪簬涓嶇ǔ瀹氫腑錛屾潯浠朵笉鍏佽闂瀹氫綅鏃犻檺鏈熴?/div> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">姝ゆ椂錛?strong>璇風珛鍗沖湪闂鐩稿叧鐨勮皟鐢ㄩ摼鏉′笂錛屼竴嬈℃э細</strong></div> <div style="color: #000000; font-family: 寰蔣闆呴粦; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;"> <ul><li><strong>鍦ㄥ嚱鏁扮殑鍏ュ彛鍜屽嚭鍙f墦鍗版棩蹇楋紝鍚屾椂</strong><strong><span style="font-size: 10.5pt; font-family: 寰蔣闆呴粦, sans-serif; color: red;">鎵撳嵃杈撳叆銆佽緭鍑哄弬鏁?/span></strong></li><li><strong>catch(){……}閲屾墦鍗皊tacktrace錛?/strong><strong><span style="font-size: 10.5pt; font-family: 寰蔣闆呴粦, sans-serif;">鍚屾椂</span><span style="font-size: 10.5pt; font-family: 寰蔣闆呴粦, sans-serif; color: red;">鎵撳嵃try鍧椾腑鍏抽敭鍙橀噺鐨勫鹼紙閬垮厤浣犲彂鐜版煇涓紓甯告槸闂絎竴鍘熷洜錛屽嵈涓嶇煡閬撴槸浠涔堝彉閲忎紶鍏ュ鑷寸殑錛?/span></strong></li><li><strong>涓庡叾浠栨ā鍧椾氦浜掔殑鎺ュ彛鍏ュ彛澶勬墦鍗拌緭鍏ュ弬鏁幫紝</strong></li></ul> </div> 鍗籌紝<strong>瑙e喅綰夸笂闂褰掓牴緇撳簳瑕侀潬log銆乤 lot of log output錛?/strong><br /> <div>鍦╨ogging鐨勫姏搴︿笂鍒囧嬁鐘圭姽璞鮑錛屾垜浠殑宸ョ▼甯堜範鎯簬鍚濆暚鍦版壘涓や釜鍑芥暟鎵撳嵃鏃ュ織銆佹墦鍖呴儴緗蹭竴鎶娿佹病鐪嬪嚭鏉ャ佸啀鎵懼嚑涓嚱鏁版墦鍗般佸啀閮ㄧ講銆佺瓑鐫鐜拌薄閲嶇幇鍐嶈瀵熴?#8230;…錛屼竴鏉ヤ簩鍘繪椂闂存祦閫濓紝闂插涵淇℃錛屼粠瀹㈡湇鐭ラ亾鐨勫皬浜嬫晠鍙樻垚浜嗗叏鍥界殕鐭ョ殑澶т簨鏁呫?/div> <div>鎵浠ワ紝鍐嶅己璋冧竴閬嶏細<strong>鍦ㄤ綘鐨勮皟鐢ㄩ摼鏉′笂錛岄愬眰璋冪敤鐨勫嚱鏁板叆鍙e拰鍑哄彛閮芥墦鍗拌緇嗘棩蹇楋紝涓嶆曞鍙曞皯錛岀劧鍚庨儴緗詫紝絳夊緟鐜拌薄閲嶇幇錛屾瘯鍏跺姛浜庝竴褰癸紒</strong></div> <div> </div> <div> <div><strong><span style="color: #0000ff; font-size: medium;">鎴戜滑瑕佽褰曚粈涔堬紵</span></strong></div> <div>1錛夊畬鎴愭煇欏規搷浣滄墍闇鐨勬椂闂?/div> </div> <div> <p>閫氳繃瀹冨彲浠ヨ窡韙負浠涔堢郴緇熷搷搴斿彉鎱㈡垨鑰呭お蹇?/p> <ul><li>澶勭悊瀹屼竴涓猧ncoming request鎵鑰楄垂鐨勬椂闂達紝綺劇‘鍒版縐?/li><li>鎵ц鏁版嵁搴撴煡璇㈢殑鏃墮棿</li><li>浠庣鐩樻垨鑰呭瓨鍌ㄤ粙璐ㄨ幏鍙栨暟鎹殑鏃墮棿</li><li>絳夌瓑</li></ul> </div> <div>2錛夊紓甯稿拰鍫嗘爤璺熻釜</div> <div> </div> <div>3錛塖essions</div> <div>鐭ラ亾涓涓棶棰樻槸鐢辮皝寮曡搗鐨勯潪甯擱噸瑕侊紝鍥犳鍦ㄦ棩蹇椾腑浣跨敤浼氳瘽鏍囪瘑絎﹀氨鍙樺緱蹇呬笉鍙皯銆傚畠鍙互綆鍗曞埌鏄竴涓?IP 鍦板潃鎴栬呮槸涓涓洿澶嶆潅鐨?UUID錛屽彧瑕佽兘鍖哄垎涓嶅悓鐨勮姹傝呭氨瓚沖銆?/div> <div> </div> <div>4錛夌増鏈彿</div> <div> </div> <div><strong>#宸ュ叿</strong></div> <div><strong><span style="color: #0000ff; font-size: medium;">鎺ㄨ崘鐨凧ava Logging妗嗘灦</span></strong></div> <div>1錛塴og4j錛氭垜浠殑閰嶇疆鏄紝log4j.appender.CONSOLE.layout.ConversionPattern= [%-d{yyyy-MM-dd HH\:mm\:ss.SSS}] [%p] [%c] [%m]%n錛?p鏄棩蹇椾紭鍏堢駭錛?c鏄被鐩悕錛?m鏄緭鍑轟俊鎭紝%n鏄洖杞︽崲琛岀銆?/div> <div>2錛塴ogback錛歭og4j鍒涘緩浜篊eki Gülcü鍚庣畫鎺ㄥ嚭浜哠LF4J+logback銆係LF4J(Simple Logging Facade for Java)浣滀負commons-logging鐨勬浛浠o紝涓哄悇縐峫ogging APIs鎻愪緵浜嗕竴涓畝鍗曠殑緇熶竴鎺ュ彛錛屼嬌寰楁渶緇堢敤鎴瘋兘澶熷湪閮ㄧ講鐨勬椂鍊欓厤緗墍甯屾湜鐨刲ogging APIs鐨勫疄鐜般俵ogback鑳滃湪鎬ц兘錛屾嵁縐?#8220;鏌愪簺鍏抽敭鎿嶄綔錛屾瘮濡傚垽瀹氭槸鍚﹁褰曚竴鏉℃棩蹇楄鍙ョ殑鎿嶄綔錛屽叾鎬ц兘寰楀埌浜嗘樉钁楃殑鎻愰珮銆傝繖涓搷浣滃湪logback 涓渶瑕?綰崇錛岃屽湪 log4j 涓垯闇瑕?0綰?縐掋?logback 鍒涘緩璁板綍鍣紙logger錛夌殑閫熷害涔熸洿蹇細13姣錛岃屽湪 log4j 涓渶瑕?3姣銆傛洿閲嶈鐨勬槸錛屽畠鑾峰彇宸插瓨鍦ㄧ殑璁板綍鍣ㄥ彧闇94綰崇錛?鑰? log4j 闇瑕?234綰崇錛屾椂闂村噺灝戝埌浜?/23銆傝窡java.util.logging(JUL)鐩告瘮鎬ц兘鎻愰珮涔熸槸鏄捐憲鐨?#8221;銆?/div> <div> </div> <div><strong>#閰嶇疆</strong></div> <div><strong><span style="color: #0000ff; font-size: medium;">涓嶈闅忎究浠庣綉涓婃壘涓涓猯og4j鐨勯厤緗枃浠訛紝璇風‘璁や綘鐞嗚В姣忎竴涓厤緗」</span></strong></div> <div>鎴戜滑鏃㈢劧杈撳嚭鏃ュ織錛岃嚜鐒舵湡鏈涘湪闈㈠“<strong>榪欎釜闂鏄惁浠庤繃鍘誨嚑澶╁紑濮嬪嚭鐜幫紵</strong>”榪欐牱鐨勭枒闂椂錛屼笉鑷充簬鍙戠幇浣犵殑rollingPolicy閿欒璁劇疆瀵艱嚧鍙兘鐪嬪埌鏈榪戝嚑灝忔椂鐨勬棩蹇楋紝鎴栬呮棩蹇楀彂鐢熸椂闂存病鏈夌簿紜埌姣銆?/div> <div> </div> <div> <div><strong>#鐞嗗康</strong></div> <div><strong><span style="color: #0000ff; font-size: medium;">鍙敤grep鎶藉彇鐨勬棩蹇楋細鐙珛鐨勮錛?/span></strong></div> <div>鎴戜滑鎬繪槸甯屾湜鑳界敤grep澶勭悊鏃ュ織鏂囦歡銆傝繖鎰忓懗鐫錛?strong>涓涓棩蹇楁潯鐩案榪滀笉搴旇璺ㄥ琛岋紝闄ら潪浣犳槸鍫嗘爤鎵撳嵃</strong>銆?/div> </div> <div>鎴戜滑浼氱敤grep闂棩蹇椾粈涔堥棶棰樺憿錛熷錛?/div> <div> <ul><li>鐢ㄦ墜鏈哄彿13910******涓嬪崟鐨勯【瀹㈡渶榪戜笁澶╁唴閮芥潵鑷簬鍝簺IP錛?/li><li>嫻忚鍦板潃鏄?***?from=kfapi鐨勯【瀹紝浣唕eferral鍗存槸鎼滅儲寮曟搸鍩熷悕錛屾渶榪戜笁澶╂湁澶氬皯嬈★紵</li><li>鏈榪戜竴鍛ㄥ唴錛岃鍗曚腑蹇冩墽琛岀殑鎵鏈変簨鍔★紝鑰楁椂鏈闀跨殑涓嬈℃槸澶氶暱鏃墮棿錛?/li><li>××××鐨勬帴鍙f槸鍚︾湡鐨勪簬18:00鍙戦佷簡涓涓姹傦紝鎴戜滑鏀跺埌鐨勫弬鏁版槸浠涔堬紵</li></ul> </div> <div>紜繚浣犵殑鏃ュ織鑳藉洖絳旇繖鏍風殑闂銆?/div> <div> </div> <div><strong><span style="color: #0000ff; font-size: medium;">涓嶅悓鍏蟲敞棰嗗煙鍐欎笉鍚岀殑鏃ュ織鏂囦歡</span></strong></div> <div>褰撹闂拰璋冪敤鏋佸叾棰戠箒錛屾湁鏃跺欎綘浼氬彂鐜版妸浣犵殑宸ョ▼閲屼粈涔堜俊鎭兘鎵撳嵃鍒頒竴涓棩蹇楁枃浠墮噷錛屼細璁╀綘鐪嬪緱澶存槒鑴戣儉銆?/div> <div>鏈綆鍗曠殑紺鴻寖灝辨槸Apache鐨勮闂棩蹇楀拰閿欒鏃ュ織鏄垎寮鐨勩?/div> <div>鍚屾牱錛屼綘涔熷彲浠ユ妸鏇村姞瀹夐潤鐨勪簨浠訛紙鍋跺皵鍑虹幇錛変笌鏇村姞鍠ч椆鐨勪簨浠跺垎寮瀛樺偍銆?/div> <div>濡傦紝瀵瑰鐨勫紑鏀懼鉤鍙板彲浠ユ墦鍗頒笁縐嶆棩蹇楁枃浠訛細connection log錛堝緩绔嬮摼鎺ュ拰鍏抽棴閾炬帴錛岄檮甯︽帴鍏ュ弬鏁幫級錛宮essage log錛堝唴閮ㄨ皟鐢ㄩ摼錛夛紝stacktrace log錛堝紓甯哥殑鍫嗘爤鎵撳嵃錛夈?/div> <div> </div> <div><strong>#鍏蜂綋瀹炵幇</strong></div> <div> <div><strong><span style="color: #0000ff; font-size: medium;">鑷沖皯綺劇‘鍒版縐?/span></strong></div> <div>鏃ュ織蹇呴』鍖呭惈鏃墮棿鎴籌紝綺劇‘鍒拌嚦灝戞縐掔駭銆?/div> </div> <div>濡傛灉鍙槸璁板綍鍒扮綰э紝鎴戜滑鏇炬槑鐭ヤ唬鐮佸洜緙轟箯騫跺彂鎺у埗鑰屼駭鐢烞UG錛屽嵈鍙兘閮侀椃鍦扮湅鐫綺劇‘鍒扮綰х殑鏃ュ織銆?/div> <div>瀵笿ava鏉ヨ錛屾渶濂介厤緗負錛?span style="font-family: tahoma;">yyyy-MM-dd/HH:mm:ss<span style="background-color: yellow; color: #ff0000;">.SSS</span>銆?/span></div> <div> </div> <div> <div><strong><span style="color: #0000ff; font-size: medium;">璇峰敖鍙兘鎵撳嵃鏄庣‘鐨勪細璇濇爣璇?/span></strong></div> <div>鏃ュ織鏉$洰閲屾墦鍗頒竴涓細璇濇爣璇嗭紙A certain session identifier錛夛紝褰撴湁璁稿騫跺彂璇鋒眰鎵撹繃鏉ユ椂錛屼綘灝辮兘鍩轟簬姝ゅ瓧孌佃繃婊?client 浜嗐傛瘮濡傦紝鎴戜滑鏃ュ織浼氳ˉ鍏呮墦鍗頒竴涓祻瑙堝櫒 cookies 閲岀涓嬬殑 UUID 銆?/div> </div> <div> </div> <div><strong><span style="color: #0000ff; font-size: medium;">log4j鐨刬sDebugEnabled鍒ゆ柇</span></strong></div> <div>濡傛灉鎵撳嵃淇℃伅鏄父閲忓瓧絎︿覆鎴栫畝鍗曞瓧絎︿覆鎷兼帴錛岄偅涔堜笉闇瑕乮f ( log.isDebugEnabled() )銆?/div> <div>濡傛灉浣犳嫾瑁呯殑鍔ㄤ綔姣旇緝鑰楄祫婧愶紝璇風敤if ( log.isDebugEnabled() )銆?/div> <div> </div> <div> <div><strong><span style="color: #0000ff; font-size: medium;">濡傛湁鍙兘錛岃灝嗘ц兘鏁版嵁鏍囧噯鍖栬緭鍑?/span></strong></div> <div>榪欐牱鏇存柟渚縢rep鎴杊adoop鍋氭ц兘鏁版嵁鎶藉彇鍜屾寲鎺橈紝浠庤岃兘寰堣交鏉懼湴杞崲涓哄浘褰㈢洃鎺с?/div> </div> <div>姣斿錛岃鍗曚腑蹇冪殑鎬ц兘鏁版嵁鏍煎紡涓猴細<strong>鏍戞灊鏍囧織 褰撳墠鑺傜偣璧峰鏃墮棿 [褰撳墠鑺傜偣鎸佺畫鏃墮棿, 褰撳墠鑺傜偣鑷韓娑堣楁椂闂? 鍦ㄧ埗鑺傜偣涓墍鍗犵殑鏃墮棿姣斾緥]</strong></div> <div> </div> <div> <div><strong><span style="color: #0000ff; font-size: medium;">鍝簺浣嶇疆闇瑕侀儴緗叉ц兘媯嫻嬬偣 </span></strong></div> <div>錛?錛夎闂暟鎹簱鐨刣ao灞傦紱</div> <div>錛?錛夎闂閮ㄨ祫婧愮殑ext灞傦紱</div> <div>錛?錛夎闂甿q鐨勬柟娉曪紱</div> <div>錛?錛夌瓑絳夛紝涓鍒囦笉鍦ㄤ綘鑷繁璐熻矗鐨勫伐紼嬫帉鎻$殑閮ㄥ垎錛堝閮級錛屾垨涓鍒囦綘璁や負鑷繁宸ョ▼鐨勬ц兘鍗遍櫓鐐癸紝閮介渶瑕佸姞鍏ユц兘鐩戞帶鏃ュ織銆?/div> </div> <div> </div> <div> </div> <div><strong>#Sample</strong></div> <div> <div><span style="color: #0000ff; font-size: medium;"><strong>涓涓ソ鐨勫惎鍔ㄦ棩蹇?/strong></span></div> </div> <div><a target="_blank"><img style="width: 709px;" src="http://images.cnblogs.com/cnblogs_com/zhengyun_ustc/255879/o_clipboard%20-013%20%E5%89%AF%E6%9C%AC.png" alt="http://images.cnblogs.com/cnblogs_com/zhengyun_ustc/255879/o_clipboard%20-013%20%E5%89%AF%E6%9C%AC.png" /></a></div> <div>鎵撳嵃浜嗗簲鐢ㄧ殑鐗堟湰鍙鳳紝瀹㈡埛绔殑浼氳瘽鏍囪瘑錛屽叧閿楠ょ殑鎵ц鏃墮暱銆?/div> <div> </div> <div><strong style="color: #0000ff; font-size: medium;">涓涓ソ鐨勫爢鏍堣窡韙棩蹇?/strong></div> <div><a target="_blank"><img style="width: 709px;" src="http://images.cnblogs.com/cnblogs_com/zhengyun_ustc/255879/o_clipboard%20-%20014%E5%89%AF%E6%9C%AC.png" alt="http://images.cnblogs.com/cnblogs_com/zhengyun_ustc/255879/o_clipboard%20-%20014%E5%89%AF%E6%9C%AC.png" /></a></div></div><br /><br /><div>鏈枃棣栧彂浜?a target="_blank">鏃佽鑰?閮戞榾</a>鐨?a target="_blank">55鏈浣沖疄璺電郴鍒?/a>錛岄摼鎺ワ細<a target="_blank">http://www.cnblogs.com/zhengyun_ustc/archive/2012/12/15/logging_bp.html</a></div><img src ="http://www.tkk7.com/zhangwei217245/aggbug/409787.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/zhangwei217245/" target="_blank">X-Spirit</a> 2011-02-12 19:55 <a href="http://www.tkk7.com/zhangwei217245/archive/2011/02/12/409787.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://ksp33.com" target="_blank">久久久久亚洲AV无码观看</a>| <a href="http://fzgjw.com" target="_blank">国产亚洲精品VA片在线播放</a>| <a href="http://www-66409b.com" target="_blank">久久精品国产亚洲一区二区三区</a>| <a href="http://shadaiym.com" target="_blank">久久国产精品亚洲一区二区</a>| <a href="http://simupiao.com" target="_blank">亚洲国产成人精品激情</a>| <a href="http://shadaiym.com" target="_blank">男男gay做爽爽的视频免费</a>| <a href="http://wwwkk5679.com" target="_blank">国产婷婷成人久久Av免费高清 </a>| <a href="http://jinguwj.com" target="_blank">亚洲另类自拍丝袜第五页</a>| <a href="http://yaku100.com" target="_blank">www.xxxx.com日本免费</a>| <a href="http://aqdav22.com" target="_blank">久久久高清免费视频</a>| <a href="http://440878.com" target="_blank">亚洲精品乱码久久久久久蜜桃不卡</a>| <a href="http://www5xsq.com" target="_blank">亚洲午夜在线播放</a>| <a href="http://bearsou.com" target="_blank">无码日韩人妻av一区免费</a>| <a href="http://cqyouyongpx.com" target="_blank">亚洲av中文无码乱人伦在线r▽</a>| <a href="http://91packing.com" target="_blank">国产亚洲精品精品精品</a>| <a href="http://23usxx.com" target="_blank">yy6080久久亚洲精品</a>| <a href="http://wxyz2.com" target="_blank">亚洲 暴爽 AV人人爽日日碰</a>| <a href="http://www-456446.com" target="_blank">成人免费午间影院在线观看</a>| <a href="http://qixiresort.com" target="_blank">亚洲天堂一区二区</a>| <a href="http://microston.com" target="_blank">a毛片成人免费全部播放</a>| <a href="http://yakonet.com" target="_blank">亚洲开心婷婷中文字幕</a>| <a href="http://82nnn.com" target="_blank">久久久久久久99精品免费观看</a>| <a href="http://121fj.com" target="_blank">91情国产l精品国产亚洲区</a>| <a href="http://yiren2233.com" target="_blank">18禁美女裸体免费网站</a>| <a href="http://zz198.com" target="_blank">亚洲成AV人在线播放无码</a>| <a href="http://xbooktxt.com" target="_blank">一区二区三区免费看</a>| <a href="http://clzqb2b.com" target="_blank">国产一区二区三区在线观看免费 </a>| <a href="http://19520888.com" target="_blank">青柠影视在线观看免费</a>| <a href="http://53reniao.com" target="_blank">日韩一区二区在线免费观看</a>| <a href="http://bx85.com" target="_blank">亚洲一级在线观看</a>| <a href="http://zuahowan.com" target="_blank">在线成人爽a毛片免费软件</a>| <a href="http://www-3499.com" target="_blank">亚洲成AV人片在线观看ww</a>| <a href="http://delvheng.com" target="_blank">99久久久国产精品免费牛牛</a>| <a href="http://lyczyb.com" target="_blank">久久精品亚洲日本佐佐木明希</a>| <a href="http://8xk7u9.com" target="_blank">国产91免费视频</a>| <a href="http://ranjihua.com" target="_blank">亚洲妇女水蜜桃av网网站</a>| <a href="http://www66susu.com" target="_blank">久久大香香蕉国产免费网站</a>| <a href="http://zbvip888.com" target="_blank">亚洲日韩小电影在线观看</a>| <a href="http://hnlchb.com" target="_blank">9久热这里只有精品免费 </a>| <a href="http://tianmao920.com" target="_blank">亚洲成A∨人片在线观看不卡</a>| <a href="http://9xav.com" target="_blank">在免费jizzjizz在线播</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>