You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
| -- This is a Hive program. Hive is an SQL-like language that compiles | |
| -- into Hadoop Map/Reduce jobs. It's very popular among analysts at | |
| -- Facebook, because it allows them to query enormous Hadoop data | |
| -- stores using a language much like SQL. | |
| -- Our logs are stored on the Hadoop Distributed File System, in the | |
| -- directory /logs/randomhacks.net/access. They're ordinary Apache | |
| -- logs in *.gz format. | |
| -- | |
| -- We want to pretend that these gzipped log files are a database table, |
| package com.jteso.hadoop.contrib.inputformat; | |
| import java.io.IOException; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.BytesWritable; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.mapreduce.InputSplit; | |
| import org.apache.hadoop.mapreduce.RecordReader; | |
| import org.apache.hadoop.mapreduce.TaskAttemptContext; |
| # GNU Screen - main configuration file | |
| # All other .screenrc files will source this file to inherit settings. | |
| # Author: Christian Wills - [email protected] | |
| # Allow bold colors - necessary for some reason | |
| attrcolor b ".I" | |
| # Tell screen how to set colors. AB = background, AF=foreground | |
| termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' |
| pv_by_industry = GROUP profile_view by viewee_industry_id | |
| pv_avg_by_industry = FOREACH pv_by_industry | |
| GENERATE group as viewee_industry_id, AVG(profie_view) AS average_pv; |
| # Requirements | |
| #sudo apt-get install libcurl4-gnutls-dev # for RCurl on linux | |
| #install.packages('RCurl') | |
| #install.packages('RJSONIO') | |
| library('RCurl') | |
| library('RJSONIO') | |
| query <- function(querystring) { | |
| h = basicTextGatherer() |
| #Colo Server costs | |
| set ServerTypes; | |
| set InstanceTypes; | |
| param CoreDemand; #How many cores do we need for a workload | |
| param OurMoney; #The maximum upper-bound of what we're willing to spend | |
| param ColoCostPerU; #How much are we paying per U of colocation | |
| param Months; # How many months do we know we need this hardware |
| package forma; | |
| import forma.WholeFileInputFormat; | |
| import cascading.scheme.Scheme; | |
| import cascading.tap.Tap; | |
| import cascading.tuple.Fields; | |
| import cascading.tuple.Tuple; | |
| import cascading.tuple.TupleEntry; | |
| import java.io.IOException; | |
| import org.apache.hadoop.mapred.JobConf; |
| #!/bin/bash | |
| # | |
| # MongoDB Backup Script | |
| # VER. 0.1 | |
| # Note, this is a lobotomized port of AutoMySQLBackup | |
| # (http://sourceforge.net/projects/automysqlbackup/) for use with | |
| # MongoDB. | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by |