דע מה למעלה ממך
וכל מעשיך בספר נכתבים
Rabbi [Yehudah ha-Nasi] says…:
Know what’s above you —
An eye seeing,
an ear hearing,
and all your actions being written in a book
[i.e. recorded and remembered]. 
In my previous post, I began a series on Pirkei Avot — it being customary to read, or “learn,” a chapter of it on each Shabbat between Pesach and Sh’vuot. Six Shabbatot. Six Chapters.
I have a secondary purpose, too. It’s common to comment on any of the terse, sutra-like, [*] individual mishnayot in this book. My additional purpose is to encourage looking not only at the text itself, but at some of the great commentaries that are available, too.
I appended “Rabbi says…” from the beginning of this mishnah. It doesn’t immediately precede the subsequent words of his that I quote, although they appear at the end of the same mishnah and are still his words.
I also translated [אומר] as “says,” rather than “said,” because it is presented in the text in the grammatical present, or present-continuous, tense. It could also be translated, “Rabbi is saying…,” which would capture some of the spirit of Jewish learning: Reading the words of sages is (or should be) as if we’re actually sitting at their feet, listening to them and learning from them.
Rabbi Yehudah ha-Nasi was the compiler of the Mishnah, and is often uniquely referred to in the Talmud as “Rabbi” or “Rebbe,” without his personal name, as a sign of respect and honor.
“Know what is above you…”
The context of this verse has to do with how to avoid committing “error,” or “sin.” The concept of “sin” itself is not a popular one, today. Perhaps it became too synonymous with an unhealthy kind of self-judgement (or of others’ opinion of what we do); too associated with fear or worry about “punishment,” or guilt, etc.
Let’s take “sin” in a more useful sense: A mistake made in the course of trying to do something that might not otherwise be “wrong,” or “evil” in itself. For example, faced with financial hardship, we seek solutions. One solution could be to try to generate income or earnings; another would be to steal what we need. The underlying problem is the same, either way. The attempt to meet our own needs isn’t evil in itself. It’s how we go about it that can become problematic. Much of counseling and psychotherapy has to do with helping a client understand what good thing they’re trying to accomplish by a behavior that might be self-injurious, destructive, or otherwise negative in some way. Once that’s understood (and it can take a while), the counselor and client or student can explore alternative solutions that would be less negative.
Even so, most people will hesitate before acting out on an impulse to do something that they know to be wrong.
“Sin” occurs when one’s own inner controls break down:
“One doesn’t sin unless a spirit of folly [רוח שטות] enters him [or her].” 
Rabbi, then, offers us spiritual guidance for just those moments when we feel the uncontrollable urge to do something that we already know to be wrong.
“Know what is above you…“:
“In the presence of kings, ministers, scholars or other prominent people, anyone would be ashamed to speak or act inappropriately. So, too, one should be constantly aware that he [or she] is literally in G-d’s Presence at all times. This awareness will deter him [or her] from sinful acts…” 
This principle is confirmed even today. One who does something wrong is simultaneously telling him- or herself, “No one sees me. I can get away with this.” One of the best deterrents to crime is obvious surveillance, in the form of a “Neighborhood Watch” program or security cameras, because hardly any criminal wants to be seen in the process of committing a crime. No one wants to be caught, or even think that they will be.
“Research has shown that increasing the severity of a punishment does not have much effect on crime, while increasing the certainty of punishment does have a deterrent effect.” 
To this, Rabbi tells us to “know” — to constantly remind ourselves and internalize the fact — that we are always being observed — even in the absence of “Neighborhood Watch” members or security cameras.
“The knowledge that whatever we say and do [or even think] is seen and heard by a Supreme Being Who rules over us [and all that happens to us] and over all else as well certainly provides us with the most powerful incentive for being both careful [to avoid doing evil] and joyously ready [to do good] in all our words and actions [and thoughts].” 
This is truest and deepest when we understand that G-d is not only “above” us, but around us and within us as well, constantly creating all that exists, while remaining present in the things created.
“The whole earth is full of His Glory.” 
“There is no presence without His Presence, there is no life without His Life, there is no substance without His Substance, there is no particle, no atom without Him in its very core. He is in the heart of all beings, and fills all reality.” 
G-d’s awareness permeates everything, everywhere, even inanimate objects; even ourselves.
That’s what “spirit of folly [רוח שטות]” means: the mistaken, silly idea that we can ever be outside of G-d’s Presence and Awareness of us and all that we do.
 Pirkei Avot 2:1
[*] referring to Patanjali’s classic Yoga text, “The Yoga Sutras.” A “sutra” is a short, terse statement that is lucid by itself, but which also invites limitless commentary. The Sanskrit word “sutra” is related to the English word “suture” or “thread;” each verse could then well be described as “thread-like.” This would be true of most of the verses, or “mishnahs,” in Pirkei Avot, too: terse, and inviting of limitless commentary.
 Sotah 3a
 Sedley, D., trans.; Rabbeinu Yohah on Pirkei Avos — The Commentary of Rabbeinu Yonah of Gerona on Chapters of the Fathers; Torahlab, © 2007
 http://en.wikipedia.org/wiki/Deterrence_%28legal%29 (further citations found there)
 Hirsch, Rabbi Samson Raphael; Chapters of the Fathers; Gertrude Hirschler, trans.; Feldheim Publishers, © 1979; p. 21
 Yishiayahu/Isa. 6:3
 Lichtenstein, Rabbi Morris; Jewish Science and Health; Jewish Science Publishing Co., © 1925; p. 14