Re: [Gluster-devel] Selectively setting loglevel for logs from an xlator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quite helpful, I definitely feel this to be a good blog material.

On Thu, 12 Jan 2017 at 16:29, Raghavendra Gowdappa <rgowdapp@xxxxxxxxxx> wrote:
All,



Not sure many of us know about how to selectively set log-level of an xlator. Thought this might be helpful to someone.



To selectively set log-level of an xlator we need to do setfattr on any path in glusterfs with "trusted.glusterfs.%s.set-log-level" (where %s is name of xlator in xlator graph) as key and log-level as value. For eg.,



[root@unused glusterfs]# gluster volume info



Volume Name: r2

Type: Distributed-Replicate

Volume ID: ff216e89-23a0-4b1e-9cf6-5f3bceea68bf

Status: Started

Snapshot Count: 0

Number of Bricks: 2 x 2 = 4

Transport-type: tcp

Bricks:

Brick1: localhost.localdomain:/home/gfs/r2_0

Brick2: localhost.localdomain:/home/gfs/r2_1

Brick3: localhost.localdomain:/home/gfs/r2_2

Brick4: localhost.localdomain:/home/gfs/r2_3

Options Reconfigured:

nfs.disable: on

performance.readdir-ahead: on

transport.address-family: inet



For the above volume the client translators are named as,

r2-client-0

r2-client-1

r2-client-2

r2-client-3



To set log-level



[root@unused glusterfs]# mount

booradley:/r2 on /mnt/glusterfs type fuse.glusterfs (rw,relatime,user_id=0,group_id=0,default_permissions,allow_other,max_read=131072)



[root@unused rhs-glusterfs]# cd /mnt/glusterfs

[root@unused glusterfs]# pwd

/mnt/glusterfs



[root@unused glusterfs]# setfattr . -n "trusted.glusterfs.r2-client-0.set-log-level" -v TRACE

[root@unused glusterfs]# setfattr . -n "trusted.glusterfs.r2-client-1.set-log-level" -v TRACE

[root@unused glusterfs]# setfattr . -n "trusted.glusterfs.r2-client-2.set-log-level" -v TRACE

[root@unused glusterfs]# setfattr . -n "trusted.glusterfs.r2-client-3.set-log-level" -v TRACE



Note that this feature is available only for clients/fuse-mount process as of now. Other daemons (bricks, selfheald, rebalance etc) don't have this feature.



regards,

Raghavendra

_______________________________________________

Gluster-devel mailing list

Gluster-devel@xxxxxxxxxxx

http://www.gluster.org/mailman/listinfo/gluster-devel

--
- Atin (atinm)
_______________________________________________
Gluster-users mailing list
Gluster-users@xxxxxxxxxxx
http://www.gluster.org/mailman/listinfo/gluster-users

[Index of Archives]     [Gluster Development]     [Linux Filesytems Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux