dataDesk BLOG

Welcome to the blog of Mr.G

Nature
Posts: 3

Blog 1: Sam Stoffel - Jack Dorsey's simple rule for success in business [2089319019065057280].mp4 | (Open) | (Share)

▲ Previous | Next ▼

/Videos

(Last modified: August 19 2026 10:40:22)
Shared by © dataDesk

Simple rule



Blog 2: Peter-Steinberger-What-Happens-When-4.7-_1786407922546.md | (Open) | (Share)

▲ Previous | Next ▼

/Uploads

(Last modified: August 11 2026 02:25:23)

Peter Steinberger: What Happens When 4.7 Million People Let It Cook - YouTube

thumbnail



Blog 3: Monitor_server_action____.md | (Open) | (Share)

▲ Previous

/Dev/Helpful

(Last modified: April 06 2025 01:37:40)

Monitor server action !!!


nohup inotifywait -mr -e move,delete,create /var/www/vhosts/domain.com/httpdocs >> /var/log/inotify_changes.log 2>&1 &

#example
nohup inotifywait -mr -e move,delete,create /var/www/vhosts/domain.com/httpdocs >> /var/www/vhosts/domain.com//logs/inotify_changes.log 2>&1 &

#see status
ps aux | grep inotifywait

# quick loook at ids
pgrep -af inotifywait

#any sh running?

ps -ef | grep -E "[^/]*/[^ ]*\.sh"

#or

ps aux | grep -E "\.sh($| )"

Reducing the number of directories being watched (or combining watches smartly) is often the best way to avoid:

  • hitting the max_user_watches limit
  • memory pressure or slowdown
  • silent failures (like the one you just had)

✅ Tips for Keeping it Stable

Here are some best practices moving forward:

1. Be precise with paths

Watch only what's necessary:

inotifywait -mr /var/www/vhosts/example.com/httpdocs/uploads

2. Exclude heavy subdirectories

If you must watch a root dir but want to skip certain subfolders:

find /your/path -type d ! -path "*/node_modules*" ! -path "*/cache*" -print | \
  xargs inotifywait -mr

3. Batch watches into fewer instances

Instead of:

inotifywait -mr /site1
inotifywait -mr /site2
inotifywait -mr /site3

You can often do:

inotifywait -mr /site1 /site2 /site3

4. Use --exclude for file types or patterns

inotifywait -mr --exclude '(\.log|\.tmp)$' /var/www

Perfect — that confirms it! 🎯

Reducing the number of directories being watched (or combining watches smartly) is often the best way to avoid:

  • hitting the max_user_watches limit
  • memory pressure or slowdown
  • silent failures (like the one you just had)

✅ Tips for Keeping it Stable

Here are some best practices moving forward:

1. Be precise with paths

Watch only what's necessary:

inotifywait -mr /var/www/vhosts/example.com/httpdocs/uploads

2. Exclude heavy subdirectories

If you must watch a root dir but want to skip certain subfolders:

find /your/path -type d ! -path "*/node_modules*" ! -path "*/cache*" -print | \
  xargs inotifywait -mr

3. Batch watches into fewer instances

Instead of:

inotifywait -mr /site1
inotifywait -mr /site2
inotifywait -mr /site3

You can often do:

inotifywait -mr /site1 /site2 /site3

4. Use --exclude for file types or patterns

inotifywait -mr --exclude '(\.log|\.tmp)$' /var/www


Who I am

"Just me, myself, and I, exploring the universe of unknownment, embracing the mystery of what lies beyond, one star at a time."

Share this page on Facebook | X.com | Reddit

Page Content

  • Image Sam Stoffel - Jack Dorsey's simple rule for success in business [2089319019065057280]
    Published: 2026-08-19
    Read
  • Image Peter-Steinberger-What-Happens-When-4.7- 1786407922546
    Published: 2026-08-16
    Read
  • Image Monitor server action
    Published: 2026-08-16
    Read

Tags

WebDev New York London AI NORWAY DIY Ideas Life Family News Clothing Invest Sports Health