dCache projects uses four (4) spaces indention. Some historic code still have mixed style. However, the newly written code must stick to spaces.
import com.sun.btrace.annotations.*; | |
import com.sun.btrace.aggregation.Aggregation; | |
import com.sun.btrace.aggregation.AggregationKey; | |
import com.sun.btrace.aggregation.AggregationFunction; | |
import com.sun.btrace.AnyType; | |
import static com.sun.btrace.BTraceUtils.*; | |
@BTrace | |
public class PnfsManagerTrace { |
####This document describes requirements for dCache's namespace (directory) service. It's heavily biased on current chimera implementation.
The main role of namespace in dCache is to provide a hierarchical structure to manage and file system objects, collection of objects, aka directories, and provide an access to the metadata associated with them. Every data file in dCache has an associated object in the namespace. Typically a change of object in the namespace, like changing the object name or changing objects ownership, does not changes the state of the data file in dCache. Each object in the namespace has a unique objID. We expect that objIDs are permanent, e.q. there objID will always point to the same data file independent from it location, state in the dCache and existence. The objIDs can’t be recycled and reused for new objects after deletion. Every object has a set of associated attributes. Some attributes are
import com.sun.btrace.annotations.*; | |
import com.sun.btrace.aggregation.Aggregation; | |
import com.sun.btrace.aggregation.AggregationKey; | |
import com.sun.btrace.aggregation.AggregationFunction; | |
import static com.sun.btrace.BTraceUtils.*; | |
/** | |
* run as: | |
* $ su dcache -c "/opt/btrace/bin/btrace <pid> NetorkInterfaceFtracer.java" | |
*/ |
#Get started with DTrace on linux ####(with CentOS7/SL7/RHEL7)
- add YUM repo
$ cd /etc/yum.repos.d
$ wget http://public-yum.oracle.com/public-yum-ol7.repo
$ rpm --import http://public-yum.oracle.com/RPM-GPG-KEY-oracle-ol7
#!/usr/bin/env python | |
""" | |
Print a histogram of word distribution. Takes single word per line from stdin | |
and prints dtrace output like histogram: | |
$ echo "some text with some text fields as text" | tr -s '[:space:]' '\n' | ./histo.py 10 | |
text | 3 | ################################################## | |
some | 2 | ################################# | |
with | 1 | ################ |
# | |
# Based on info providef at http://fasterdata.es.net/ | |
# | |
# allow testing with buffers up to 64MB | |
net.core.rmem_max = 67108864 | |
net.core.wmem_max = 67108864 | |
# Enable memory auto tuning | |
net.ipv4.tcp_moderate_rcvbuf = 1 |