Skip to content

Instantly share code, notes, and snippets.

# Get msr-tools from https://www.kernel.org/pub/linux/utils/cpu/msr-tools/
Run:
./rdmsr -d -f 15:8 0x199 -> (IA32_PERF_CTL) This gives you the p-state that the OS is requesting
./rdmsr -d -f 15:8 0x198 -> (IA32_PERF_STATUS) This gives you the p-state that the processor is delivering
#
# Background: this was done on a CentOS 6.5 ESXi VM running pmacct 1.5.0rc2 and PostgreSQL 9.3 from PGDG repo with
# the following config line for pmacct:
#
# ./configure --enable-pgsql --enable-geoip --enable-ipv6 --with-pgsql-libs=/usr/pgsql-9.3/lib --with-pgsql-includes=/usr/pgsql-9.3/include
#
#
# I also customized the table they used in postgres to add vertical partitioning, but that's another gist :)
#
root@localhost ~ # coreos-cloudinit --from-ec2-metadata="http://169.254.169.254"
Checking availability of "ec2-metadata-service"
Fetching user-data from datasource of type "ec2-metadata-service"
2014/09/12 18:50:18 Fetching data from http://169.254.169.254/2009-04-04/user-data. Attempt #1
Fetching meta-data from datasource of type "ec2-metadata-service"
2014/09/12 18:50:18 Fetching data from http://169.254.169.254/2009-04-04/meta-data/public-keys. Attempt #1
2014/09/12 18:50:18 Fetching data from http://169.254.169.254/2009-04-04/meta-data/hostname. Attempt #1
2014/09/12 18:50:18 Fetching data from http://169.254.169.254/2009-04-04/meta-data/local-ipv4. Attempt #1
2014/09/12 18:50:18 Fetching data from http://169.254.169.254/2009-04-04/meta-data/public-ipv4. Attempt #1
2014/09/12 18:50:18 Fetching data from http://169.254.169.254/2009-04-04/meta-data/network_config/content_path. Attempt #1
2014-05-27 23:51:28.067489 7f7eda9b9700 -1 msg/Pipe.cc: In function 'int Pipe::connect()' thread 7f7eda9b9700 time 2014-05-27 23:51:27.526399
msg/Pipe.cc: 1070: FAILED assert(m)
ceph version 0.80.1 (a38fe1169b6d2ac98b427334c12d7cf81f809b74)
1: (Pipe::connect()+0x3d0c) [0xb2931c]
2: (Pipe::writer()+0x9f3) [0xb2a063]
3: (Pipe::Writer::entry()+0xd) [0xb359cd]
4: /lib64/libpthread.so.0() [0x37cb2079d1]
5: (clone()+0x6d) [0x37caae8b7d]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
diff --git a/spi.c b/spi.c
index 94a76a7..b5c4bde 100644
--- a/spi.c
+++ b/spi.c
@@ -104,18 +104,18 @@ int default_spi_write_256(struct flashctx *flash, uint8_t *buf,
int spi_chip_read(struct flashctx *flash, uint8_t *buf, unsigned int start,
unsigned int len)
{
- unsigned int addrbase = 0;
+ unsigned long long addrbase = 0;
# hexdump -C test
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
10000000
@devicenull
devicenull / gist:8720643
Last active August 29, 2015 13:55
Flashrom MX25L25635F chip defintiion
diff --git a/flashchips.c b/flashchips.c
index a6db11e..ac3ef53 100644
--- a/flashchips.c
+++ b/flashchips.c
@@ -5907,6 +5907,33 @@ const struct flashchip flashchips[] = {
.voltage = {3000, 3600},
},
+ {
+ .vendor = "Macronix",
diff --git a/chipdrivers.h b/chipdrivers.h
index 851e90a..3f31293 100644
--- a/chipdrivers.h
+++ b/chipdrivers.h
@@ -52,6 +52,7 @@ int spi_block_erase_c4(struct flashctx *flash, unsigned int addr, unsigned int b
int spi_block_erase_c7(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
int spi_block_erase_d7(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
int spi_block_erase_d8(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
+int spi_block_erase_dc(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
int spi_block_erase_db(struct flashctx *flash, unsigned int addr, unsigned int blocklen);
<form method="POST" action="http://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/V0001?format=xml">
<input type="hidden" name="itemcount" value='1'>
<input type="hidden" name="publishedfileids[0]" value='99831877'>
<input type='submit'>
</form>
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- stud/interval
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/logstash/logstash-1.1.9-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/logstash/logstash-1.1.9-monolithic.jar!/logstash/JRUBY-6970.rb:10)
at RUBY.(root)(file:/C:/logstash/logstash-1.1.9-monolithic.jar!/logstash/filterworker.rb:5)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at Kernel.require(jar:file:/C:/logstash/logstash-1.1.9-monolithic.jar!/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at Kernel.require(file:/C:/logstash/logstash-1.1.9-monolithic.jar!/logstash/JRUBY-6970.rb:10)
at RUBY.(root)(file:/C:/logstash/logstash-1.1.9-monolithic.jar!/logstash/agent.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java