Skip to content

Instantly share code, notes, and snippets.

@ubergarm
Last active March 4, 2020 15:06
Show Gist options
  • Save ubergarm/be6921dbaaf6b500a74af16ecb8c33a5 to your computer and use it in GitHub Desktop.
Save ubergarm/be6921dbaaf6b500a74af16ecb8c33a5 to your computer and use it in GitHub Desktop.
AWS-lambda-stats

AWS lambda status

Some info about what kind of server you get inside a lambda function on AWS.

memory_size = 1536

Linux

$ uname -a
Linux ip-10-25-140-177 4.9.43-17.39.amzn1.x86_64 #1 SMP Fri Sep 15 23:39:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Memory

$ free
             total       used       free     shared    buffers     cached
Mem:       3855920     722372    3133548       3892      50500     480456
-/+ buffers/cache:     191416    3664504
Swap:            0          0          0

Disk

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       30G  2.9G   27G  10% /
/dev/loop0      526M  440K  514M   1% /tmp

GPU

$ lscpi
# couldn't find anything
$ ls -laR /dev/
/dev:
total 8
drwxr-xr-x  2 root root 4096 Oct 10 20:02 .
drwxr-xr-x 21 root root 4096 Oct 10 20:02 ..
crw-rw-rw-  1 root root 1, 7 Oct 10 20:02 full
crw-rw-rw-  1 root root 1, 3 Oct 10 20:02 null
crw-rw-rw-  1 root root 1, 8 Oct 10 20:02 random
lrwxrwxrwx  1 root root   15 Oct 10 20:02 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root   15 Oct 10 20:02 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root   15 Oct 10 20:02 stdout -> /proc/self/fd/1
crw-rw-rw-  1 root root 1, 9 Oct 10 20:02 urandom
crw-rw-rw-  1 root root 1, 5 Oct 10 20:02 zero

cgroups

$ cat /proc/cgroups
TBD

CPU

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 63
model name	: Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
stepping	: 2
microcode	: 0x3a
cpu MHz		: 2900.000
cache size	: 25600 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs		:
bogomips	: 5800.11
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 63
model name	: Intel(R) Xeon(R) CPU E5-2666 v3 @ 2.90GHz
stepping	: 2
microcode	: 0x3a
cpu MHz		: 2900.000
cache size	: 25600 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 erms invpcid xsaveopt
bugs		:
bogomips	: 5878.03
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

memory_size = 128

Linux

$ uname -a
Linux ip-10-31-54-50 4.9.43-17.39.amzn1.x86_64 #1 SMP Fri Sep 15 23:39:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Memory

$ free
             total       used       free     shared    buffers     cached
Mem:       3855912    1674932    2180980        852      55584     791560
-/+ buffers/cache:     827788    3028124
Swap:            0          0          0

Disk

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/xvda1       30G  3.2G   27G  11% /
/dev/loop3      526M  440K  514M   1% /tmp
$ cat /proc/mounts
/dev/xvda1 / ext4 ro,nosuid,nodev,noatime,data=ordered 0 0
/dev/xvda1 /var/task ext4 ro,nosuid,noatime,data=ordered 0 0
/dev/xvda1 /dev ext4 rw,nosuid,noexec,noatime,data=ordered 0 0
/dev/loop3 /tmp ext4 rw,relatime,data=ordered 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
/dev/xvda1 /proc/sys/kernel/random/boot_id ext4 ro,nosuid,nodev,noatime,data=ordered 0 0
/dev/xvda1 /var/runtime ext4 ro,nosuid,nodev,noatime,data=ordered 0 0
/dev/xvda1 /var/lang ext4 ro,nosuid,nodev,noatime,data=ordered 0 0

GPU

$ lscpi
# couldn't find anything
$ ls -laR /dev/
/dev/:
total 8
drwxr-xr-x  2 root root 4096 Oct 10 17:19 .
drwxr-xr-x 21 root root 4096 Oct 10 17:19 ..
crw-rw-rw-  1 root root 1, 7 Oct 10 17:19 full
crw-rw-rw-  1 root root 1, 3 Oct 10 17:19 null
crw-rw-rw-  1 root root 1, 8 Oct 10 17:19 random
lrwxrwxrwx  1 root root   15 Oct 10 17:19 stderr -> /proc/self/fd/2
lrwxrwxrwx  1 root root   15 Oct 10 17:19 stdin -> /proc/self/fd/0
lrwxrwxrwx  1 root root   15 Oct 10 17:19 stdout -> /proc/self/fd/1
crw-rw-rw-  1 root root 1, 9 Oct 10 17:19 urandom
crw-rw-rw-  1 root root 1, 5 Oct 10 17:19 zero
$ cat /proc/devices
Character devices:
  1 mem
  4 /dev/vc/0
  4 tty
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
  7 vcs
 10 misc
 13 input
128 ptm
136 pts
202 cpu/msr
203 cpu/cpuid
253 hidraw
254 bsg

Block devices:
259 blkext
  7 loop
  9 md
202 xvd
253 device-mapper
254 mdp

cgroups

$ cat /proc/cgroups
#subsys_name    hierarchy       num_cgroups     enabled
cpuset  4       1       1
cpu     2       6       1
cpuacct 3       19      1
blkio   1       1       1
memory  8       32      1
devices 5       1       1
freezer 6       5       1
net_cls 0       1       1
perf_event      9       1       1
net_prio        0       1       1
hugetlb 7       1       1
pids    0       1       1
$ cat /proc/self/cgroup
9:perf_event:/
8:memory:/sandbox-3ff3dd
7:hugetlb:/
6:freezer:/sandbox-067e02
5:devices:/
4:cpuset:/
3:cpuacct:/sandbox-80c150
2:cpu:/sandbox-root-lABjl4/sandbox-3784fc
1:blkio:/

CPU

$ cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 62
model name	: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
stepping	: 4
microcode	: 0x428
cpu MHz		: 2799.815
cache size	: 25600 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm fsgsbase smep erms xsaveopt
bugs		:
bogomips	: 5600.10
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

processor	: 1
vendor_id	: GenuineIntel
cpu family	: 6
model		: 62
model name	: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
stepping	: 4
microcode	: 0x428
cpu MHz		: 2799.815
cache size	: 25600 KB
physical id	: 0
siblings	: 2
core id		: 0
cpu cores	: 1
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 13
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology eagerfpu pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm fsgsbase smep erms xsaveopt
bugs		:
bogomips	: 5675.79
clflush size	: 64
cache_alignment	: 64
address sizes	: 46 bits physical, 48 bits virtual
power management:

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment