using system;
using system.io;
class watcher
// create a new filesystemwatcher and set its properties.
filesystemwatcher watcher = new filesystemwatcher();
watcher.path = args[1];
/* watch for changes in lastaccess and lastwrite times, and
the renaming of files or directories. */
watcher.notifyfilter = notifyfilters.lastaccess | notifyfilters.lastwrite
| notifyfilters.filename | notifyfilters.directoryname;
// only watch text files.
watcher.filter = "*.txt";
// add event handlers.
watcher.changed += new filesystemeventhandler(onchanged);
watcher.created += new filesystemeventhandler(onchanged);
watcher.deleted += new filesystemeventhandler(onchanged);
watcher.renamed += new renamedeventhandler(onrenamed);
// begin watching.
watcher.enableraisingevents = true;
// wait for the user to quit the program.
console.writeline("press /'q/' to quit the sample.");
while(console.read()!='q');
}// define the event handlers.
private static void onchanged(object source, filesystemeventargs e)
private static void onrenamed(object source, renamedeventargs e)
renamed to ", e.oldfullpath, e.fullpath);}}
mysql 鎖監視器 MySQL鎖監視器
還在為看不懂何登成的加鎖處理分析文章感到羞愧嗎?還在因為何大師的筆誤,陷入深深的迷茫嗎?只要你擁有大於5.6.16版本的mysql,鎖監視器你值得擁有 快速入門 開啟set global innodb status output on set global innodb status output ...
mysql 鎖監視器 MySQL鎖監視器
標籤 還在為看不懂何登成的加鎖處理分析文章感到羞愧嗎?還在因為何大師的筆誤,陷入深深的迷茫嗎?只要你擁有大於5.6.16版本的mysql,鎖監視器你值得擁有 快速入門 開啟set global innodb status output on set global innodb status outp...
效能監視器
效能監視器捕捉硬體和軟體部件,如處理器 程序 執行緒等生成的效能資料,由此跟蹤資源狀態。執行效能監視器,通過執行命令提示符指令 perfmon如圖 為了獲得以前只在效能監視器中可用的大量資料的實時快照,sql server現在通過一組動態管理檢視 dmv 和動態管理函式 dmf 在內部提供了相同的資...