Skip to main content

Posts

Showing posts from May, 2015

Graphite carbon-cache IOError with too many open files

When running carbon-cache daemon, clients are seeing errors such as connection refused by the daemon, a common reason for this is setting small number of file descriptors.
/var/log/carbon/console.log file, there may be
exceptions.IOError: [Errno 24] Too many open files:'/var/lib/graphite/whisper/systems/<host_name>/<metric_name>.wsp'
The number of files carbon-cache daemon can open should be increased. Many Linux systems set file descriptors to a maximum of 1024 as default. A value of 16384 may be good enough depending on how many clients are simultaneously connecting to the carbon-cache daemon.
In Linux, sysctl and ulimit programs can be used to set system-wide resource use.

Listing group membership of a user or members of a group in Linux

lid is a handy command-line tool for getting group membership of a user or list of users a group contains.
If you invoke lid just without any option, it will list groups containing the invoking user.
# lid No user name specified, using root. root(gid=0) bin(gid=1) daemon(gid=2) sys(gid=3) adm(gid=4) disk(gid=6) wheel(gid=10)
By default lid lists groups containing user name.
# lid mysql mysql(gid=27)
with -g option lid lists users in a group.
# lid -g users games(uid=12)
If you don't want to display user or group IDs then you should use -n or --onlynames options.
# lid -g -n bin bin root daemon